# mDNSResponder problem with service subtype



## RobiGi (Apr 6, 2013)

Hallo everybody. 

I'm new of this forum and also not so much skilled in FreeBSD. I'm just having fun with an installation of NAS4Free 9.1.0.1 (based on FreeBSD 9.1), but I need help to sort out a problem. I've installed a printer and I've shared it with CUPS. No problems with other PC on the local network: sharing and printing are OK. Wishing to share the printer also with my iPad and iPhone, I installed Avahi and I succeeded in sharing the printer also with my apple devices. At this point I told myself: why not to try the same only with mDNSresponder, avoiding the installation of Avahi? 

The sharing a printer with Apple devices involves the announcement of the service subtype together with the service type, otherwise Apple  devices will not be able to discover that printer! In Avahi this is done in the .service file associate with the printer. In that file you have to write something like this:

```
...
<service>
<type>_ipp._tcp</type>
<subtype>_universal._sub._ipp._tcp</subtype>
<port>631</port>
...
```

The same thing should be possible with mDNSResponder, specifying the service in /var/etc/mdnsresponder.conf. I guessed, reading the source code of mDNSResponder, that you can describe the service to be announced more or less in this way:


```
...
mynas4free
_universal._ipp._tcp. local.
631
...
```


Unfortunat*e*ly this syntax doesn't work: it generates this entry in the syslog:

```
mDNSResponderPosix: ConstructServiceName: Transport protocol name must be _udp or _tcp: mynas4free._universal._ipp._tcp.local.
```

I tried other syntax, but with no luck:

```
...
_ipp._tcp.,_universal.  local.
_ipp._tcp. _universal.  local.
...
```

Could anybody help me to understand and sort out this problem?
TIA
Roberto


----------



## DutchDaemon (Apr 6, 2013)

Disclaimer: PC-BSD, DesktopBSD, FreeNAS, *NAS4Free*, m0N0WALL, pfSense, ArchBSD, kFreeBSD topics


----------



## kpa (Apr 6, 2013)

Lose the dot from the end of the service type.


```
_universal._ipp._tcp
```


----------



## RobiGi (Apr 6, 2013)

I've tried looking for support in the NAS4Free forum http://forums.nas4free.org/viewtopic.php?f=57&t=3074 five days ago, but until now no answer to my post (even though a dozen of people viewed it. So I tried to ask in the FreeBSD forum. I will respect the disc*l*aimer, supplying evidence of my try to get answers from the FreeBSD derivative forum, and accepting every given information as a contribution to my knowledge (not so high indeed at the moment).

Roberto


----------



## RobiGi (Apr 6, 2013)

Thank you @kpa for the suggestion. I've tried it, but the problem remains the same. If I announce only the IPP service everything works fine on mDNSResponder side, but Apple devices are not able to discover the printer because they look for ipp services with subtype universal.

Roberto


----------

