Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/netinet ANSIfy function prototypes. (Still have about 3/...



details:   https://anonhg.NetBSD.org/src/rev/e5269152f790
branches:  trunk
changeset: 573615:e5269152f790
user:      perry <perry%NetBSD.org@localhost>
date:      Thu Feb 03 03:49:01 2005 +0000

description:
ANSIfy function prototypes. (Still have about 3/5ths of the C files in
netinet to go...)

diffstat:

 sys/netinet/igmp.c      |   30 +++++---------
 sys/netinet/in.c        |   77 ++++++++++-------------------------
 sys/netinet/in4_cksum.c |    9 +--
 sys/netinet/in_cksum.c  |    8 +--
 sys/netinet/in_gif.c    |   26 +++---------
 sys/netinet/in_pcb.c    |  101 ++++++++++++++---------------------------------
 sys/netinet/ip_ecn.c    |   24 ++--------
 sys/netinet/ip_encap.c  |   82 +++++++++++---------------------------
 8 files changed, 108 insertions(+), 249 deletions(-)

diffs (truncated from 990 to 300 lines):

diff -r ac3d0ba6d1cc -r e5269152f790 sys/netinet/igmp.c
--- a/sys/netinet/igmp.c        Thu Feb 03 02:23:02 2005 +0000
+++ b/sys/netinet/igmp.c        Thu Feb 03 03:49:01 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: igmp.c,v 1.40 2005/02/02 21:41:55 perry Exp $  */
+/*     $NetBSD: igmp.c,v 1.41 2005/02/03 03:49:01 perry Exp $  */
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -40,7 +40,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: igmp.c,v 1.40 2005/02/02 21:41:55 perry Exp $");
+__KERNEL_RCSID(0, "$NetBSD: igmp.c,v 1.41 2005/02/03 03:49:01 perry Exp $");
 
 #include "opt_mrouting.h"
 
@@ -76,8 +76,7 @@
 static void rti_delete(struct ifnet *);
 
 static int
-rti_fill(inm)
-       struct in_multi *inm;
+rti_fill(struct in_multi *inm)
 {
        struct router_info *rti;
 
@@ -102,8 +101,7 @@
 }
 
 static struct router_info *
-rti_find(ifp)
-       struct ifnet *ifp;
+rti_find(struct ifnet *ifp)
 {
        struct router_info *rti;
 
@@ -122,8 +120,7 @@
 }
 
 static void
-rti_delete(ifp)
-       struct ifnet *ifp;
+rti_delete(struct ifnet *ifp)
 {
        struct router_info *rti;
 
@@ -414,8 +411,7 @@
 }
 
 int
-igmp_joingroup(inm)
-       struct in_multi *inm;
+igmp_joingroup(struct in_multi *inm)
 {
        int report_type;
        int s = splsoftnet();
@@ -441,8 +437,7 @@
 }
 
 void
-igmp_leavegroup(inm)
-       struct in_multi *inm;
+igmp_leavegroup(struct in_multi *inm)
 {
 
        switch (inm->inm_state) {
@@ -461,7 +456,7 @@
 }
 
 void
-igmp_fasttimo()
+igmp_fasttimo(void)
 {
        struct in_multi *inm;
        struct in_multistep step;
@@ -499,7 +494,7 @@
 }
 
 void
-igmp_slowtimo()
+igmp_slowtimo(void)
 {
        struct router_info *rti;
        int s;
@@ -515,9 +510,7 @@
 }
 
 void
-igmp_sendpkt(inm, type)
-       struct in_multi *inm;
-       int type;
+igmp_sendpkt(struct in_multi *inm, int type)
 {
        struct mbuf *m;
        struct igmp *igmp;
@@ -579,8 +572,7 @@
 }
 
 void
-igmp_purgeif(ifp)
-       struct ifnet *ifp;
+igmp_purgeif(struct ifnet *ifp)
 {
 
        rti_delete(ifp);
diff -r ac3d0ba6d1cc -r e5269152f790 sys/netinet/in.c
--- a/sys/netinet/in.c  Thu Feb 03 02:23:02 2005 +0000
+++ b/sys/netinet/in.c  Thu Feb 03 03:49:01 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: in.c,v 1.102 2005/02/02 21:41:55 perry Exp $   */
+/*     $NetBSD: in.c,v 1.103 2005/02/03 03:49:01 perry Exp $   */
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -98,7 +98,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: in.c,v 1.102 2005/02/02 21:41:55 perry Exp $");
+__KERNEL_RCSID(0, "$NetBSD: in.c,v 1.103 2005/02/03 03:49:01 perry Exp $");
 
 #include "opt_inet.h"
 #include "opt_inet_conf.h"
@@ -168,8 +168,7 @@
  * Otherwise, it includes only the directly-connected (sub)nets.
  */
 int
-in_localaddr(in)
-       struct in_addr in;
+in_localaddr(struct in_addr in)
 {
        struct in_ifaddr *ia;
 
@@ -191,8 +190,7 @@
  * may be forwarded.
  */
 int
-in_canforward(in)
-       struct in_addr in;
+in_canforward(struct in_addr in)
 {
        u_int32_t net;
 
@@ -210,8 +208,7 @@
  * Trim a mask in a sockaddr
  */
 void
-in_socktrim(ap)
-       struct sockaddr_in *ap;
+in_socktrim(struct sockaddr_in *ap)
 {
        char *cplim = (char *) &ap->sin_addr;
        char *cp = (char *) (&ap->sin_addr + 1);
@@ -229,8 +226,7 @@
  *  "dotted quad" representation for printing.
  */
 const char *
-in_fmtaddr(addr)
-       struct in_addr addr;
+in_fmtaddr(struct in_addr addr)
 {
        static char buf[sizeof("123.456.789.123")];
 
@@ -252,7 +248,7 @@
 unsigned long in_maxmtu;
 
 void
-in_setmaxmtu()
+in_setmaxmtu(void)
 {
        struct in_ifaddr *ia;
        struct ifnet *ifp;
@@ -271,8 +267,7 @@
 }
 
 static u_int
-in_mask2len(mask)
-       struct in_addr *mask;
+in_mask2len(struct in_addr *mask)
 {
        u_int x, y;
        u_char *p;
@@ -293,9 +288,7 @@
 }
 
 static void
-in_len2mask(mask, len)
-       struct in_addr *mask;
-       u_int len;
+in_len2mask(struct in_addr *mask, u_int len)
 {
        u_int i;
        u_char *p;
@@ -314,12 +307,8 @@
  */
 /* ARGSUSED */
 int
-in_control(so, cmd, data, ifp, p)
-       struct socket *so;
-       u_long cmd;
-       caddr_t data;
-       struct ifnet *ifp;
-       struct proc *p;
+in_control(struct socket *so, u_long cmd, caddr_t data, struct ifnet *ifp,
+    struct proc *p)
 {
        struct ifreq *ifr = (struct ifreq *)data;
        struct in_ifaddr *ia = 0;
@@ -570,9 +559,7 @@
 }
 
 void
-in_purgeaddr(ifa, ifp)
-       struct ifaddr *ifa;
-       struct ifnet *ifp;
+in_purgeaddr(struct ifaddr *ifa, struct ifnet *ifp)
 {
        struct in_ifaddr *ia = (void *) ifa;
 
@@ -588,8 +575,7 @@
 }
 
 void
-in_purgeif(ifp)
-       struct ifnet *ifp;
+in_purgeif(struct ifnet *ifp)
 {
        struct ifaddr *ifa, *nifa;
 
@@ -623,12 +609,8 @@
  *     other values may be returned from in_ioctl()
  */
 static int
-in_lifaddr_ioctl(so, cmd, data, ifp, p)
-       struct socket *so;
-       u_long cmd;
-       caddr_t data;
-       struct ifnet *ifp;
-       struct proc *p;
+in_lifaddr_ioctl(struct socket *so, u_long cmd, caddr_t data,
+    struct ifnet *ifp, struct proc *p)
 {
        struct if_laddrreq *iflr = (struct if_laddrreq *)data;
        struct ifaddr *ifa;
@@ -796,9 +778,7 @@
  * Delete any existing route for an interface.
  */
 void
-in_ifscrub(ifp, ia)
-       struct ifnet *ifp;
-       struct in_ifaddr *ia;
+in_ifscrub(struct ifnet *ifp, struct in_ifaddr *ia)
 {
 
        in_scrubprefix(ia);
@@ -809,11 +789,8 @@
  * and routing table entry.
  */
 int
-in_ifinit(ifp, ia, sin, scrub)
-       struct ifnet *ifp;
-       struct in_ifaddr *ia;
-       struct sockaddr_in *sin;
-       int scrub;
+in_ifinit(struct ifnet *ifp, struct in_ifaddr *ia,
+    struct sockaddr_in *sin, int scrub)
 {
        u_int32_t i;
        struct sockaddr_in oldaddr;
@@ -917,9 +894,7 @@
  * does nothing if there's some interface address with the same prefix already.
  */
 static int
-in_addprefix(target, flags)
-       struct in_ifaddr *target;
-       int flags;
+in_addprefix(struct in_ifaddr *target, int flags)
 {
        struct in_ifaddr *ia;
        struct in_addr prefix, mask, p;
@@ -967,8 +942,7 @@
  * with the same prefix (otherwise we lose the route mistakenly).
  */
 static int
-in_scrubprefix(target)
-       struct in_ifaddr *target;
+in_scrubprefix(struct in_ifaddr *target)
 {
        struct in_ifaddr *ia;
        struct in_addr prefix, mask, p;
@@ -1026,9 +1000,7 @@
  * Return 1 if the address might be a local broadcast address.
  */
 int
-in_broadcast(in, ifp)
-       struct in_addr in;
-       struct ifnet *ifp;
+in_broadcast(struct in_addr in, struct ifnet *ifp)



Home | Main Index | Thread Index | Old Index