Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 11 May 2007 18:29:56 GMT
From:      Fredrik Lindberg <fli@FreeBSD.org>
To:        Perforce Change Reviews <perforce@FreeBSD.org>
Subject:   PERFORCE change 119681 for review
Message-ID:  <200705111829.l4BITu87011951@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=119681

Change 119681 by fli@fli_genesis on 2007/05/11 18:29:23

	o Remove unused variables from structure
	o Re-arrange include statements
	o Change some comments to reflect reality 

Affected files ...

.. //depot/projects/soc2007/fli-mdns_sd/mdnsd/mdns.h#3 edit

Differences ...

==== //depot/projects/soc2007/fli-mdns_sd/mdnsd/mdns.h#3 (text+ko) ====

@@ -27,11 +27,12 @@
 #ifndef _MDNS_H_
 #define _MDNS_H_
 
+#include <sys/queue.h>
+#include <sys/socket.h>
+#include <net/if.h>
+#include <netinet/in.h>
+#include <stdint.h>
 #include <wchar.h>
-#include <sys/stdint.h>
-#include <netinet/in.h>
-#include <net/if.h>
-#include <sys/queue.h>
 
 #include "stack_buf.h"
 
@@ -49,28 +50,27 @@
 #define MDNS_UDP6 0x0004	/* udp inet6 socket open */
 #define MDNS_TCP6 0x0008	/* tcp inet6 socket open */
 	int md_udp4; /* udp4 socket */
-	int md_udp4_snd; /* send udp4 socket */
 	int *md_tcp4; /* array of open tcp4 sockets */
 	int md_tcp4_sz; /* size of array */
 	struct sockaddr_in md_sin4;
 #ifdef INET6
 	int md_udp6; /* udp6 socket */
-	int md_udp6_snd; /* send udp4 socket */
 	int *md_tcp6; /* array of open tcp6 sockets */
 	int md_tcp6_sz; /* size of array */
 	struct sockaddr_in6 md_sin6;
 #endif
 	uint16_t md_maxpkgsz; /* max (udp) packet size */
 	struct mdns_bufpool *md_bp; /* buffer pool */
-	TAILQ_HEAD(, mdns_packet) md_pkglist; /* free list */
-	int md_pkgfree;
-	int md_pkgtotal;
+	TAILQ_HEAD(, mdns_packet) md_pkglist; /* packet free list */
+	int md_pkgfree; /* free packets */
+	int md_pkgtotal; /* total number of packets */
 };
 
 /*
  * Transport types
- * Multicast is always done over UDP, only unicast queries/responses
- * may be sent over TCP if they do not fit a UDP packet.
+ * UDP is the common transport type, and should be used in most cases.
+ * TCP may only be used if the source port of a client is different from
+ * 5353 and the response is too large to fit a legacy sized DNS UDP packet.
  */
 enum { MDNS_UDP, MDNS_TCP };
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200705111829.l4BITu87011951>