PERFORCE change 100552 for review

Paolo Pisati piso at FreeBSD.org
Tue Jul 4 09:00:49 UTC 2006


http://perforce.freebsd.org/chv.cgi?CH=100552

Change 100552 by piso at piso_newluxor on 2006/07/04 08:59:58

	Style: fix comments and whitespaces

Affected files ...

.. //depot/projects/soc2005/libalias/sys/netinet/libalias/alias_mod.h#4 edit

Differences ...

==== //depot/projects/soc2005/libalias/sys/netinet/libalias/alias_mod.h#4 (text+ko) ====

@@ -24,7 +24,7 @@
  * SUCH DAMAGE.
  */
 
-/*-
+/*
  * Alias_mod.h defines the outside world interfaces for the packet aliasing
  * modular framework
  */
@@ -32,13 +32,13 @@
 #ifndef _ALIAS_MOD_H_
 #define _ALIAS_MOD_H_
 
-/* protocol handlers struct & function*/
+/* Protocol handlers struct & function. */
 
-/* packet flow direction */
+/* Packet flow direction. */
 #define IN                              1 
 #define OUT                             2 
 
-/* working protocol */
+/* Working protocol. */
 #define IP                              1 
 #define TCP                             2
 #define UDP                             4
@@ -47,17 +47,16 @@
 /* 
  * Data passed to protocol handler module, it must be filled
  * right before calling find_handler() to determine which
- * module is elegible to be called
+ * module is elegible to be called.
  */
 
-struct alias_data {
-	
+struct alias_data {	
 	struct alias_link       *lnk;
 	struct in_addr          *original_address;
 	struct in_addr          *alias_address;
-	u_short                 *alias_port;
-	u_int16_t               *sport, *dport;	
-	int                     maxpacketsize;
+	uint16_t                *alias_port;
+	uint16_t                *sport, *dport;	
+	uint16_t                maxpacketsize;
 }; 
 
 /* 
@@ -66,29 +65,26 @@
  */
 
 struct proto_handler {
-
-	u_int pri;                                              /* handler priority */
-        int16_t dir;                                            /* flow direction */
-	int16_t proto;                                          /* working protocol */
-	int (*fingerprint)(struct libalias *la,                 /* fingerprint * function */
+	uint pri;                                               /* Handler priority. */
+        int16_t dir;                                            /* Flow direction. */
+	int16_t proto;                                          /* Working protocol. */	
+	int (*fingerprint)(struct libalias *la,                 /* Fingerprint * function. */
 		 struct ip *pip, struct alias_data *ah);
-	int (*protohandler)(struct libalias *la,                /* aliasing * function */
+	int (*protohandler)(struct libalias *la,                /* Aliasing * function. */
 		 struct ip *pip, struct alias_data *ah);                 
 	struct proto_handler *next;
 };
 
 #if __FreeBSD_version >= 500000
 struct chain {
-
 	void            *chain;	
-	struct mtx	mtx;		/* lock guarding list */
-	int		busy_count;	/* busy count for rw locks */
+	struct mtx	mtx;		/* Lock guarding list. */
+	int		busy_count;	/* Busy count for rw locks. */
 	int		want_write;
 	struct cv	cv;
 };
 #else
 struct chain {
-
 	void            *chain;	
 	int             spl;
 };
@@ -97,23 +93,22 @@
 /* 
  * Used only in userland when libalias needs to keep track of all
  * module loaded. In kernel land (kld mode) we don't need to care
- * care about libalias modules cause it's kld to do it for us
+ * care about libalias modules cause it's kld to do it for us.
  */
 
 #define DLL_LEN         32
-struct dll {
-	
-	char            name[DLL_LEN];  /* name of module */
+struct dll {	
+	char            name[DLL_LEN];  /* Name of module. */
 	void            *handle;        /* 
-					 * ptr to shared obj obtained through
+					 * Ptr to shared obj obtained through
 					 * dlopen() - use this ptr to get access
 					 * to any symbols from a loaded module 					 
-					 * via dlsym() 
+					 * via dlsym(). 
 					 */
 	struct dll      *next;
 };
 
-/* functions used with protocol handlers */
+/* Functions used with protocol handlers. */
 
 void            handler_chain_init(void);
 void            handler_chain_destroy(void);
@@ -124,7 +119,7 @@
 			   struct ip *, struct alias_data *);
 struct proto_handler *first_handler(void);
 
-/* functions used with dll module */
+/* Functions used with dll module. */
 
 void            dll_chain_init(void);
 void            dll_chain_destroy(void);
@@ -132,31 +127,31 @@
 void            *detach_dll(char *);
 struct dll      *walk_dll_chain(void);
 
-/* general condition of success & failure */
+/* General condition of success & failure. */
 #define OK      1 
 #define NOK     -1
 
-/* end of handlers */
+/* End of handlers. */
 #define EOH     -1
 
 /* 
- * handler/dll conflict - tried to attach a protocol handleror a dll, 
+ * Handler/dll conflict - tried to attach a protocol handleror a dll, 
  * but found another one with same priority, direction and working 
- * protocol(proto handler) or name (dll) already in chain
+ * protocol(proto handler) or name (dll) already in chain.
  */
 
 #define EHDCON 2 
 
 /* 
- * handler/dll not found - tried to detach/search a protocol module 
- * handler or a dll not present in chain
+ * Handler/dll not found - tried to detach/search a protocol module 
+ * handler or a dll not present in chain.
  */
 
 #define EHDNOF  3
 
 /* 
  * Some defines borrowed from sys/module.h used to compile a kld
- * in userland as a shared lib
+ * in userland as a shared lib.
  */
 
 #ifndef _KERNEL


More information about the p4-projects mailing list