PERFORCE change 106243 for review
Paolo Pisati
piso at FreeBSD.org
Sun Sep 17 07:22:37 PDT 2006
http://perforce.freebsd.org/chv.cgi?CH=106243
Change 106243 by piso at piso_newluxor on 2006/09/17 14:21:45
Cosmetic and whitespace reduction.
Affected files ...
.. //depot/projects/soc2005/libalias/sbin/natd/natd.c#5 edit
.. //depot/projects/soc2005/libalias/sys/netinet/libalias/alias.h#4 edit
.. //depot/projects/soc2005/libalias/sys/netinet/libalias/alias_db.c#11 edit
Differences ...
==== //depot/projects/soc2005/libalias/sbin/natd/natd.c#5 (text+ko) ====
@@ -349,7 +349,6 @@
siginterrupt(SIGHUP, 1);
signal (SIGTERM, InitiateShutdown);
signal (SIGHUP, RefreshAddr);
-
/*
* Set alias address if it has been given.
*/
==== //depot/projects/soc2005/libalias/sys/netinet/libalias/alias.h#4 (text+ko) ====
@@ -193,6 +193,7 @@
* Mode flags and other constants.
*/
+
/* Mode flags, set using PacketAliasSetMode() */
/*
==== //depot/projects/soc2005/libalias/sys/netinet/libalias/alias_db.c#11 (text+ko) ====
@@ -160,7 +160,7 @@
#include <sys/socket.h>
#include <netinet/tcp.h>
-#ifdef _KERNEL
+#ifdef _KERNEL
#include <netinet/libalias/alias.h>
#include <netinet/libalias/alias_local.h>
#include <netinet/libalias/alias_mod.h>
@@ -173,6 +173,7 @@
static LIST_HEAD(, libalias) instancehead = LIST_HEAD_INITIALIZER(instancehead);
+
/*
Constants (note: constants are also defined
near relevant functions or structs)
@@ -338,6 +339,7 @@
/* Kernel module definition. */
#ifdef _KERNEL
MALLOC_DEFINE(M_ALIAS, "libalias", "packet aliasing");
+
MODULE_VERSION(libalias, 1);
static int
@@ -359,6 +361,7 @@
default:
error = EINVAL;
}
+
return (error);
}
@@ -479,7 +482,6 @@
static void
ShowAliasStats(struct libalias *la)
{
-
/* Used for debugging */
if (la->logDesc) {
int tot = la->icmpLinkCount + la->udpLinkCount +
@@ -2220,10 +2222,11 @@
fprintf(la->logDesc, "PacketAlias/InitPacketAliasLog: Packet alias logging enabled.\n");
#endif
else
- return(ENOMEM); /* log initialization failed */
+ return (ENOMEM); /* log initialization failed */
la->packetAliasMode |= PKT_ALIAS_LOG;
}
- return(1);
+
+ return (1);
}
/* Close the log-file and disable logging. */
@@ -2535,7 +2538,7 @@
if (flags & mask & PKT_ALIAS_LOG) {
/* Do the enable */
if (InitPacketAliasLog(la) == ENOMEM)
- return(-1);
+ return (-1);
} else
/* _Disable_ logging? */
if (~flags & mask & PKT_ALIAS_LOG) {
@@ -2574,7 +2577,6 @@
/* Firewall include files */
#include <net/if.h>
-
#include <netinet/ip_fw.h>
#include <string.h>
#include <err.h>
More information about the p4-projects
mailing list