Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 30 Jul 2006 14:35:33 GMT
From:      Paolo Pisati <piso@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 102788 for review
Message-ID:  <200607301435.k6UEZXEA067548@repoman.freebsd.org>

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

Change 102788 by piso@piso_newluxor on 2006/07/30 14:35:20

	As long as we access symbols via dlopen() & friends, we
	can declare them static.

Affected files ...

.. //depot/projects/soc2005/libalias/sys/netinet/libalias/alias_cuseeme.c#6 edit
.. //depot/projects/soc2005/libalias/sys/netinet/libalias/alias_dummy.c#5 edit
.. //depot/projects/soc2005/libalias/sys/netinet/libalias/alias_ftp.c#6 edit
.. //depot/projects/soc2005/libalias/sys/netinet/libalias/alias_irc.c#6 edit
.. //depot/projects/soc2005/libalias/sys/netinet/libalias/alias_nbt.c#6 edit
.. //depot/projects/soc2005/libalias/sys/netinet/libalias/alias_pptp.c#5 edit
.. //depot/projects/soc2005/libalias/sys/netinet/libalias/alias_skinny.c#5 edit
.. //depot/projects/soc2005/libalias/sys/netinet/libalias/alias_smedia.c#6 edit

Differences ...

==== //depot/projects/soc2005/libalias/sys/netinet/libalias/alias_cuseeme.c#6 (text+ko) ====

@@ -69,10 +69,7 @@
 static void
 AliasHandleCUSeeMeIn(struct libalias *la, struct ip *pip, 
 		     struct in_addr original_addr);
-#ifdef _KERNEL
-static 
-#endif
-int 
+static int 
 fingerprint(struct libalias *la, struct ip *pip, struct alias_data *ah) {
 
 	if (ah->dport == NULL || ah->oaddr == NULL)
@@ -82,20 +79,14 @@
 	return (-1);
 }
 
-#ifdef _KERNEL
-static 
-#endif
-int 
+static int 
 protohandlerin(struct libalias *la, struct ip *pip, struct alias_data *ah) {
 	
 	AliasHandleCUSeeMeIn(la, pip, *ah->oaddr);
 	return (0);
 }
 
-#ifdef _KERNEL
-static 
-#endif
-int 
+static int 
 protohandlerout(struct libalias *la, struct ip *pip, struct alias_data *ah) {
 	
 	AliasHandleCUSeeMeOut(la, pip, ah->lnk);
@@ -144,7 +135,8 @@
 #ifdef _KERNEL
 static 
 #endif
-moduledata_t alias_mod = {
+moduledata_t 
+alias_mod = {
        "alias_cuseeme", mod_handler, NULL
 };
 
@@ -183,10 +175,7 @@
 					 * counts etc */
 };
 
-#ifdef _KERNEL
-static
-#endif
-void
+static void
 AliasHandleCUSeeMeOut(struct libalias *la, struct ip *pip, struct alias_link *lnk)
 {
 	struct udphdr *ud = ip_next(pip);
@@ -209,10 +198,7 @@
 	}
 }
 
-#ifdef _KERNEL
-static
-#endif
-void
+static void
 AliasHandleCUSeeMeIn(struct libalias *la, struct ip *pip, struct in_addr original_addr)
 {
 	struct in_addr alias_addr;

==== //depot/projects/soc2005/libalias/sys/netinet/libalias/alias_dummy.c#5 (text+ko) ====

@@ -68,10 +68,7 @@
 static void
 AliasHandleDummy(struct libalias *la, struct ip *ip, struct alias_data *ah);
 
-#ifdef _KERNEL
-static
-#endif
-int 
+static int 
 fingerprint(struct libalias *la, struct ip *pip, struct alias_data *ah) {
 
 	/* 
@@ -96,10 +93,7 @@
  * packets
  */
 
-#ifdef _KERNEL
-static
-#endif
-int 
+static int 
 protohandler(struct libalias *la, struct ip *pip, struct alias_data *ah) {
 	
 	AliasHandleDummy(la, pip, ah);
@@ -158,10 +152,7 @@
 MODULE_DEPEND(alias_dummy, libalias, 1, 1, 1);
 #endif
 
-#ifdef _KERNEL
-static
-#endif
-void
+static void
 AliasHandleDummy(struct libalias *la, struct ip *ip, struct alias_data *ah) {
 	; /* dummy */
 }

==== //depot/projects/soc2005/libalias/sys/netinet/libalias/alias_ftp.c#6 (text+ko) ====

@@ -107,10 +107,7 @@
 AliasHandleFtpOut(struct libalias *, struct ip *, struct alias_link *,	
 		  int maxpacketsize);
 
-#ifdef _KERNEL
-static
-#endif
-int 
+static int 
 fingerprint(struct libalias *la, struct ip *pip, struct alias_data *ah) {
 
 	if (ah->dport == NULL || ah->sport == NULL || ah->lnk == NULL || 
@@ -122,10 +119,7 @@
 	return (-1);
 }
 
-#ifdef _KERNEL
-static
-#endif
-int 
+static int 
 protohandler(struct libalias *la, struct ip *pip, struct alias_data *ah) {
 	
 	AliasHandleFtpOut(la, pip, ah->lnk, ah->maxpktsize);
@@ -196,8 +190,7 @@
 static int	ParseFtp229Reply(struct libalias *la, char *, int);
 static void	NewFtpMessage(struct libalias *la, struct ip *, struct alias_link *, int, int);
 
-static
-void
+static void
 AliasHandleFtpOut(
     struct libalias *la,
     struct ip *pip,		/* IP packet to examine/patch */

==== //depot/projects/soc2005/libalias/sys/netinet/libalias/alias_irc.c#6 (text+ko) ====

@@ -96,10 +96,7 @@
 AliasHandleIrcOut(struct libalias *, struct ip *, struct alias_link *,	
 		  int maxpacketsize);
 
-#ifdef _KERNEL
-static 
-#endif
-int 
+static int 
 fingerprint(struct libalias *la, struct ip *pip, struct alias_data *ah) {
 
 	if (ah->dport == NULL || ah->dport == NULL || ah->lnk == NULL || 
@@ -111,10 +108,7 @@
 	return (-1);
 }
 
-#ifdef _KERNEL
-static 
-#endif
-int 
+static int 
 protohandler(struct libalias *la, struct ip *pip, struct alias_data *ah) {
 	
 	AliasHandleIrcOut(la, pip, ah->lnk, ah->maxpktsize);
@@ -165,10 +159,7 @@
 MODULE_DEPEND(alias_irc, libalias, 1, 1, 1);
 #endif
 
-#ifdef _KERNEL
-static
-#endif
-void
+static void
 AliasHandleIrcOut(struct libalias *la,
     struct ip *pip,		/* IP packet to examine */
     struct alias_link *lnk,	/* Which link are we on? */

==== //depot/projects/soc2005/libalias/sys/netinet/libalias/alias_nbt.c#6 (text+ko) ====

@@ -84,10 +84,7 @@
 static int
 AliasHandleUdpNbtNS(struct libalias *, struct ip *, struct alias_link *,
 		    struct in_addr *, u_short *, struct in_addr *, u_short *);
-#ifdef _KERNEL
-static 
-#endif
-int 
+static int 
 fingerprint1(struct libalias *la, struct ip *pip, struct alias_data *ah) {
 
 	if (ah->dport == NULL || ah->sport == NULL || ah->lnk == NULL || 
@@ -99,20 +96,14 @@
 	return (-1);
 }
 
-#ifdef _KERNEL
-static 
-#endif
-int 
+static int 
 protohandler1(struct libalias *la, struct ip *pip, struct alias_data *ah) {
 	
 	AliasHandleUdpNbt(la, pip, ah->lnk, ah->aaddr, *ah->aport);
 	return (0);
 }
 
-#ifdef _KERNEL
-static 
-#endif
-int 
+static int 
 fingerprint2(struct libalias *la, struct ip *pip, struct alias_data *ah) {
 
 	if (ah->dport == NULL || ah->sport == NULL || ah->lnk == NULL || 
@@ -124,10 +115,7 @@
 	return (-1);
 }
 
-#ifdef _KERNEL
-static 
-#endif
-int 
+static int 
 protohandler2(struct libalias *la, struct ip *pip, struct alias_data *ah) {
 	
 	AliasHandleUdpNbtNS(la, pip, ah->lnk, &pip->ip_src, ah->sport,
@@ -333,10 +321,7 @@
 #define DGM_POSITIVE_RES	0x15
 #define DGM_NEGATIVE_RES	0x16
 
-#ifdef _KERNEL
-static
-#endif
-int
+static int
 AliasHandleUdpNbt(
     struct libalias *la,
     struct ip *pip,		/* IP packet to examine/patch */
@@ -764,10 +749,7 @@
 	return ((u_char *) q);
 }
 
-#ifdef _KERNEL
-static
-#endif
-int
+static int
 AliasHandleUdpNbtNS(
     struct libalias *la,
     struct ip *pip,		/* IP packet to examine/patch */

==== //depot/projects/soc2005/libalias/sys/netinet/libalias/alias_pptp.c#5 (text+ko) ====

@@ -92,10 +92,7 @@
 static int
 AliasHandlePptpGreIn(struct libalias *, struct ip *);
 
-#ifdef _KERNEL
-static 
-#endif
-int 
+static int 
 fingerprint(struct libalias *la, struct ip *pip, struct alias_data *ah) {
 
 	if (ah->dport == NULL || ah->sport == NULL || ah->lnk == NULL)
@@ -106,39 +103,27 @@
 	return (-1);
 }
 
-#ifdef _KERNEL
-static 
-#endif 
-int 
+static int 
 fingerprintgre(struct libalias *la, struct ip *pip, struct alias_data *ah) {
 
 	return (0);
 }
 
-#ifdef _KERNEL
-static 
-#endif
-int 
+static int 
 protohandlerin(struct libalias *la, struct ip *pip, struct alias_data *ah) {
 	
 	AliasHandlePptpIn(la, pip, ah->lnk);
 	return (0);
 }
 
-#ifdef _KERNEL
-static 
-#endif
-int 
+static int 
 protohandlerout(struct libalias *la, struct ip *pip, struct alias_data *ah) {
 	
 	AliasHandlePptpOut(la, pip, ah->lnk);
 	return (0);
 }
 
-#ifdef _KERNEL
-static 
-#endif
-int 
+static int 
 protohandlergrein(struct libalias *la, struct ip *pip, struct alias_data *ah) {
 
 	if (la->packetAliasMode & PKT_ALIAS_PROXY_ONLY ||
@@ -147,10 +132,7 @@
 	return (-1);
 }
 
-#ifdef _KERNEL
-static 
-#endif
-int 
+static int 
 protohandlergreout(struct libalias *la, struct ip *pip, struct alias_data *ah) {
 
 	if (AliasHandlePptpGreOut(la, pip) == 0)
@@ -322,10 +304,7 @@
 static PptpCallId AliasVerifyPptp(struct ip *, u_int16_t *);
 
 
-#ifdef _KERNEL
-static
-#endif
-void
+static void
 AliasHandlePptpOut(struct libalias *la,
     struct ip *pip,		/* IP packet to examine/patch */
     struct alias_link *lnk)
@@ -397,10 +376,7 @@
 	}
 }
 
-#ifdef _KERNEL
-static
-#endif
-void
+static void
 AliasHandlePptpIn(struct libalias *la,
     struct ip *pip,		/* IP packet to examine/patch */
     struct alias_link *lnk)
@@ -503,10 +479,7 @@
 		return (PptpCallId) (hptr + 1);
 }
 
-#ifdef _KERNEL
-static
-#endif
-int
+static int
 AliasHandlePptpGreOut(struct libalias *la, struct ip *pip)
 {
 	GreHdr *gr;
@@ -530,10 +503,7 @@
 	return (0);
 }
 
-#ifdef _KERNEL
-static
-#endif
-int
+static int
 AliasHandlePptpGreIn(struct libalias *la, struct ip *pip)
 {
 	GreHdr *gr;

==== //depot/projects/soc2005/libalias/sys/netinet/libalias/alias_skinny.c#5 (text+ko) ====

@@ -67,10 +67,7 @@
 static void
 AliasHandleSkinny(struct libalias *, struct ip *, struct alias_link *);
 
-#ifdef _KERNEL
-static 
-#endif
-int 
+static int 
 fingerprint(struct libalias *la, struct ip *pip, struct alias_data *ah) {
 
 	if (ah->dport == NULL || ah->sport == NULL || ah->lnk == NULL)
@@ -81,10 +78,7 @@
 	return (-1);
 }
 
-#ifdef _KERNEL
-static 
-#endif
-int 
+static int 
 protohandler(struct libalias *la, struct ip *pip, struct alias_data *ah) {
 	
         AliasHandleSkinny(la, pip, ah->lnk);
@@ -314,10 +308,7 @@
 	return (0);
 }
 
-#ifdef _KERNEL
-static
-#endif
-void
+static void
 AliasHandleSkinny(struct libalias *la, struct ip *pip, struct alias_link *lnk)
 {
 	size_t hlen, tlen, dlen;

==== //depot/projects/soc2005/libalias/sys/netinet/libalias/alias_smedia.c#6 (text+ko) ====

@@ -136,10 +136,7 @@
 static void
 AliasHandleRtspOut(struct libalias *, struct ip *, struct alias_link *,	
 		  int maxpacketsize);
-#ifdef _KERNEL
-static 
-#endif
-int 
+static int 
 fingerprint(struct libalias *la, struct ip *pip, struct alias_data *ah) {
 
 	if (ah->dport == NULL || ah->sport == NULL || ah->lnk == NULL || 
@@ -154,10 +151,7 @@
 	return (-1);
 }
 
-#ifdef _KERNEL
-static 
-#endif
-int 
+static int 
 protohandler(struct libalias *la, struct ip *pip, struct alias_data *ah) {
 	
 	if (ntohs(*ah->dport) == TFTP_PORT_NUMBER)
@@ -483,10 +477,7 @@
 	return (0);
 }
 
-#ifdef _KERNEL
-static
-#endif
-void
+static void
 AliasHandleRtspOut(struct libalias *la, struct ip *pip, struct alias_link *lnk, int maxpacketsize)
 {
 	int hlen, tlen, dlen;



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