aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/ip
diff options
context:
space:
mode:
authorrsc <devnull@localhost>2006-04-01 19:24:03 +0000
committerrsc <devnull@localhost>2006-04-01 19:24:03 +0000
commitcbeb0b26e4c7caa8d1b47de791a7418dc20a4567 (patch)
treee0f7e445de1aa22a42ef873dc4b1118a8105ae93 /src/cmd/ip
parent226d80b8213821af0cbf092d1507c52b504fd368 (diff)
downloadplan9port-cbeb0b26e4c7caa8d1b47de791a7418dc20a4567.tar.gz
plan9port-cbeb0b26e4c7caa8d1b47de791a7418dc20a4567.tar.bz2
plan9port-cbeb0b26e4c7caa8d1b47de791a7418dc20a4567.zip
Use gcc -ansi -pedantic in 9c. Fix many non-C89-isms.
Diffstat (limited to 'src/cmd/ip')
-rwxr-xr-xsrc/cmd/ip/dhcp.h2
-rwxr-xr-xsrc/cmd/ip/dhcpd/dat.h2
-rwxr-xr-xsrc/cmd/ip/dhcpd/dhcpd.c22
-rwxr-xr-xsrc/cmd/ip/dhcpd/ping.c2
-rwxr-xr-xsrc/cmd/ip/snoopy/arp.c8
-rwxr-xr-xsrc/cmd/ip/snoopy/bootp.c6
-rwxr-xr-xsrc/cmd/ip/snoopy/dhcp.c8
-rwxr-xr-xsrc/cmd/ip/snoopy/dump.c2
-rwxr-xr-xsrc/cmd/ip/snoopy/ether.c8
-rwxr-xr-xsrc/cmd/ip/snoopy/gre.c4
-rwxr-xr-xsrc/cmd/ip/snoopy/hdlc.c4
-rwxr-xr-xsrc/cmd/ip/snoopy/icmp.c10
-rwxr-xr-xsrc/cmd/ip/snoopy/icmp6.c24
-rwxr-xr-xsrc/cmd/ip/snoopy/il.c8
-rwxr-xr-xsrc/cmd/ip/snoopy/ip.c10
-rwxr-xr-xsrc/cmd/ip/snoopy/ip6.c12
-rwxr-xr-xsrc/cmd/ip/snoopy/main.c2
-rwxr-xr-xsrc/cmd/ip/snoopy/ninep.c2
-rwxr-xr-xsrc/cmd/ip/snoopy/ospf.c8
-rwxr-xr-xsrc/cmd/ip/snoopy/ppp.c20
-rwxr-xr-xsrc/cmd/ip/snoopy/pppoe_disc.c6
-rw-r--r--src/cmd/ip/snoopy/protos.c2
-rwxr-xr-xsrc/cmd/ip/snoopy/rtcp.c34
-rwxr-xr-xsrc/cmd/ip/snoopy/rtp.c14
-rwxr-xr-xsrc/cmd/ip/snoopy/tcp.c10
-rwxr-xr-xsrc/cmd/ip/snoopy/udp.c8
26 files changed, 119 insertions, 119 deletions
diff --git a/src/cmd/ip/dhcp.h b/src/cmd/ip/dhcp.h
index 8b517958..0ca5084f 100755
--- a/src/cmd/ip/dhcp.h
+++ b/src/cmd/ip/dhcp.h
@@ -126,7 +126,7 @@ enum {
Srequesting,
Sbound,
Srenewing,
- Srebinding,
+ Srebinding
};
typedef struct Bootp Bootp;
diff --git a/src/cmd/ip/dhcpd/dat.h b/src/cmd/ip/dhcpd/dat.h
index 28604c1b..aa64deeb 100755
--- a/src/cmd/ip/dhcpd/dat.h
+++ b/src/cmd/ip/dhcpd/dat.h
@@ -2,7 +2,7 @@
enum
{
- Maxstr= 256,
+ Maxstr= 256
};
typedef struct Binding Binding;
diff --git a/src/cmd/ip/dhcpd/dhcpd.c b/src/cmd/ip/dhcpd/dhcpd.c
index 3b0873c2..ae4bd223 100755
--- a/src/cmd/ip/dhcpd/dhcpd.c
+++ b/src/cmd/ip/dhcpd/dhcpd.c
@@ -12,9 +12,9 @@
int bwfd;
int wfd;
-//
-// ala rfc2131
-//
+/* */
+/* ala rfc2131 */
+/* */
typedef struct Req Req;
struct Req
@@ -63,7 +63,7 @@ int slow;
char net[256];
uchar xmyipaddr[IPaddrlen];
-int pptponly; // only answer request that came from the pptp server
+int pptponly; /* only answer request that came from the pptp server */
int mute;
int minlease = MinLease;
@@ -160,7 +160,7 @@ char *optname[256] =
[ODvendorclass] "vendorclass",
[ODclientid] "cid",
[ODtftpserver] "tftpserver",
-[ODbootfile] "bf",
+[ODbootfile] "bf"
};
void addropt(Req*, int, uchar*);
@@ -1131,8 +1131,8 @@ miscoptions(Req *rp, uchar *ip)
addropt(rp, OBrouter, rp->giaddr);
}
- // OBhostname for the HP4000M switches
- // (this causes NT to log infinite errors - tough shit )
+ /* OBhostname for the HP4000M switches */
+ /* (this causes NT to log infinite errors - tough shit ) */
if(*rp->ii.domain){
remrequested(rp, OBhostname);
stringopt(rp, OBhostname, rp->ii.domain);
@@ -1236,10 +1236,10 @@ miscoptions(Req *rp, uchar *ip)
break;
}
- // add plan9 specific options
+ /* add plan9 specific options */
if(strncmp((char*)rp->vendorclass, "plan9_", 6) == 0
|| strncmp((char*)rp->vendorclass, "p9-", 3) == 0){
- // point to temporary area
+ /* point to temporary area */
op = rp->p;
omax = rp->max;
rp->p = vopts;
@@ -1250,7 +1250,7 @@ miscoptions(Req *rp, uchar *ip)
j = lookupserver("auth", addrs, t);
addrsopt(rp, OP9auth, addrs, j);
- // point back
+ /* point back */
j = rp->p - vopts;
rp->p = op;
rp->max = omax;
@@ -1544,7 +1544,7 @@ char *dhcpmsgname[] =
[Ack] "Ack",
[Nak] "Nak",
[Release] "Release",
- [Inform] "Inform",
+ [Inform] "Inform"
};
void
diff --git a/src/cmd/ip/dhcpd/ping.c b/src/cmd/ip/dhcpd/ping.c
index 7fa7a424..666bcc41 100755
--- a/src/cmd/ip/dhcpd/ping.c
+++ b/src/cmd/ip/dhcpd/ping.c
@@ -37,7 +37,7 @@ enum
InfoReply = 16,
ICMP_IPSIZE = 20,
- ICMP_HDRSIZE = 8,
+ ICMP_HDRSIZE = 8
};
static void
diff --git a/src/cmd/ip/snoopy/arp.c b/src/cmd/ip/snoopy/arp.c
index 061a6d9d..d317c1bb 100755
--- a/src/cmd/ip/snoopy/arp.c
+++ b/src/cmd/ip/snoopy/arp.c
@@ -20,7 +20,7 @@ struct Hdr
enum
{
- ARPLEN= 28,
+ ARPLEN= 28
};
enum
@@ -31,7 +31,7 @@ enum
Osha,
Otha,
Ostha,
- Opa,
+ Opa
};
static Field p_fields[] =
@@ -114,7 +114,7 @@ Proto arp =
nil,
nil,
p_fields,
- defaultframer,
+ defaultframer
};
Proto rarp =
@@ -126,5 +126,5 @@ Proto rarp =
nil,
nil,
p_fields,
- defaultframer,
+ defaultframer
};
diff --git a/src/cmd/ip/snoopy/bootp.c b/src/cmd/ip/snoopy/bootp.c
index 31b2b0e0..e7ead863 100755
--- a/src/cmd/ip/snoopy/bootp.c
+++ b/src/cmd/ip/snoopy/bootp.c
@@ -24,7 +24,7 @@ enum
Bootreply= 2,
/* bootp flags */
- Fbroadcast= 1<<15,
+ Fbroadcast= 1<<15
};
typedef struct Hdr Hdr;
@@ -52,7 +52,7 @@ enum
{
Oca,
Osa,
- Ot,
+ Ot
};
static Field p_fields[] =
@@ -173,5 +173,5 @@ Proto bootp =
p_mux,
"%#.8lux",
p_fields,
- defaultframer,
+ defaultframer
};
diff --git a/src/cmd/ip/snoopy/dhcp.c b/src/cmd/ip/snoopy/dhcp.c
index 2d041f8b..cd976ec0 100755
--- a/src/cmd/ip/snoopy/dhcp.c
+++ b/src/cmd/ip/snoopy/dhcp.c
@@ -99,8 +99,8 @@ enum
ODbootfile= 67,
/* plan9 vendor info options */
- OP9fs= 128, // plan9 file servers
- OP9auth= 129, // plan9 auth servers
+ OP9fs= 128, /* plan9 file servers */
+ OP9auth= 129, /* plan9 auth servers */
};
static void
@@ -188,7 +188,7 @@ static char *dhcptype[256] =
[Ack] "Ack",
[Nak] "Nak",
[Release] "Release",
-[Inform] "Inform",
+[Inform] "Inform"
};
@@ -471,6 +471,6 @@ Proto dhcp =
nil,
nil,
nil,
- defaultframer,
+ defaultframer
};
diff --git a/src/cmd/ip/snoopy/dump.c b/src/cmd/ip/snoopy/dump.c
index 227ac641..ec2a3ce7 100755
--- a/src/cmd/ip/snoopy/dump.c
+++ b/src/cmd/ip/snoopy/dump.c
@@ -75,5 +75,5 @@ Proto dump =
nil,
nil,
nil,
- defaultframer,
+ defaultframer
};
diff --git a/src/cmd/ip/snoopy/ether.c b/src/cmd/ip/snoopy/ether.c
index 7e1f0a7f..9e16579a 100755
--- a/src/cmd/ip/snoopy/ether.c
+++ b/src/cmd/ip/snoopy/ether.c
@@ -29,10 +29,10 @@ static Mux p_mux[] =
enum
{
- Os, // source
- Od, // destination
- Oa, // source or destination
- Ot, // type
+ Os, /* source */
+ Od, /* destination */
+ Oa, /* source or destination */
+ Ot, /* type */
};
static Field p_fields[] =
diff --git a/src/cmd/ip/snoopy/gre.c b/src/cmd/ip/snoopy/gre.c
index 908d1553..6808293b 100755
--- a/src/cmd/ip/snoopy/gre.c
+++ b/src/cmd/ip/snoopy/gre.c
@@ -8,7 +8,7 @@ enum {
GRE_srcrt = (1<<11),
GRE_recur = (7<<8),
GRE_ack = (1<<7),
- GRE_ver = 0x7,
+ GRE_ver = 0x7
};
/* GRE protocols */
@@ -25,7 +25,7 @@ enum {
GRE_vinesecho = 0x0bae,
GRE_vinesloop = 0x0baf,
GRE_decnetIV = 0x6003,
- GRE_ppp = 0x880b,
+ GRE_ppp = 0x880b
};
int
diff --git a/src/cmd/ip/snoopy/hdlc.c b/src/cmd/ip/snoopy/hdlc.c
index fdf2aaac..e7bf3739 100755
--- a/src/cmd/ip/snoopy/hdlc.c
+++ b/src/cmd/ip/snoopy/hdlc.c
@@ -12,7 +12,7 @@ enum {
PPP_addr= 0xff,
PPP_ctl= 0x3,
PPP_initfcs= 0xffff,
- PPP_goodfcs= 0xf0b8,
+ PPP_goodfcs= 0xf0b8
};
/*
@@ -171,5 +171,5 @@ Proto hdlc =
p_mux,
"%#.4lux",
nil,
- p_framer,
+ p_framer
};
diff --git a/src/cmd/ip/snoopy/icmp.c b/src/cmd/ip/snoopy/icmp.c
index 274c955e..bf09f8d8 100755
--- a/src/cmd/ip/snoopy/icmp.c
+++ b/src/cmd/ip/snoopy/icmp.c
@@ -14,7 +14,7 @@ struct Hdr
enum
{
- ICMPLEN= 4,
+ ICMPLEN= 4
};
enum
@@ -41,7 +41,7 @@ enum
TSreq= 13,
TSrep= 14,
InfoReq= 15,
- InfoRep= 16,
+ InfoRep= 16
};
static Mux p_mux[] =
@@ -51,7 +51,7 @@ static Mux p_mux[] =
{"ip", Redirect, },
{"ip", TimeExceed, },
{"ip", ParamProb, },
- {0},
+ {0}
};
char *icmpmsg[236] =
@@ -66,7 +66,7 @@ char *icmpmsg[236] =
[TSreq] "TSreq",
[TSrep] "TSrep",
[InfoReq] "InfoReq",
-[InfoRep] "InfoRep",
+[InfoRep] "InfoRep"
};
static void
@@ -193,5 +193,5 @@ Proto icmp =
p_mux,
"%lud",
p_fields,
- defaultframer,
+ defaultframer
};
diff --git a/src/cmd/ip/snoopy/icmp6.c b/src/cmd/ip/snoopy/icmp6.c
index ad33610f..9ba74939 100755
--- a/src/cmd/ip/snoopy/icmp6.c
+++ b/src/cmd/ip/snoopy/icmp6.c
@@ -14,7 +14,7 @@ struct Hdr
enum
{
- ICMP6LEN= 4,
+ ICMP6LEN= 4
};
enum
@@ -30,7 +30,7 @@ static Field p_fields[] =
enum
{
- // ICMPv6 types
+ /* ICMPv6 types */
EchoReply = 0,
UnreachableV6 = 1,
PacketTooBigV6 = 2,
@@ -54,7 +54,7 @@ enum
NbrAdvert = 136,
RedirectV6 = 137,
- Maxtype6 = 137,
+ Maxtype6 = 137
};
static Mux p_mux[] =
@@ -62,7 +62,7 @@ static Mux p_mux[] =
{"ip6", UnreachableV6, },
{"ip6", RedirectV6, },
{"ip6", TimeExceedV6, },
- {0},
+ {0}
};
char *icmpmsg6[256] =
@@ -87,7 +87,7 @@ char *icmpmsg6[256] =
[RouterAdvert] "RouterAdvert",
[NbrSolicit] "NbrSolicit",
[NbrAdvert] "NbrAdvert",
-[RedirectV6] "RedirectV6",
+[RedirectV6] "RedirectV6"
};
static char *unreachcode[] =
@@ -97,14 +97,14 @@ static char *unreachcode[] =
[2] "icmp unreachable: unassigned error code (2)",
[3] "address unreachable",
[4] "port unreachable",
-[5] "icmp unreachable: unknown code",
+[5] "icmp unreachable: unknown code"
};
static char *timexcode[] =
{
[0] "hop limit exc",
[1] "reassmbl time exc",
-[2] "icmp time exc: unknown code",
+[2] "icmp time exc: unknown code"
};
static char *parpcode[] =
@@ -112,7 +112,7 @@ static char *parpcode[] =
[0] "erroneous header field encountered",
[1] "unrecognized Next Header type encountered",
[2] "unrecognized IPv6 option encountered",
-[3] "icmp par prob: unknown code",
+[3] "icmp par prob: unknown code"
};
enum
{
@@ -120,7 +120,7 @@ enum
tll = 2,
pref = 3,
redir = 4,
- mtu = 5,
+ mtu = 5
};
static char *icmp6opts[256] =
@@ -130,7 +130,7 @@ static char *icmp6opts[256] =
[2] "tll_addr",
[3] "pref_opt",
[4] "redirect",
-[5] "mtu_opt",
+[5] "mtu_opt"
};
static void
@@ -278,7 +278,7 @@ p_seprint(Msg *m)
char *e = m->e;
int i;
uchar *a;
-// ushort cksum2, cksum;
+/* ushort cksum2, cksum; */
h = (Hdr*)m->ps;
m->ps += ICMP6LEN;
@@ -425,5 +425,5 @@ Proto icmp6 =
p_mux,
"%lud",
p_fields,
- defaultframer,
+ defaultframer
};
diff --git a/src/cmd/ip/snoopy/il.c b/src/cmd/ip/snoopy/il.c
index 46bd2811..a4ff60eb 100755
--- a/src/cmd/ip/snoopy/il.c
+++ b/src/cmd/ip/snoopy/il.c
@@ -19,14 +19,14 @@ struct Hdr
enum
{
- ILLEN= 18,
+ ILLEN= 18
};
enum
{
Os,
Od,
- Osd,
+ Osd
};
static Field p_fields[] =
@@ -45,7 +45,7 @@ static Mux p_mux[] =
{"ninep", 17005, }, /* ocpu */
{"ninep", 17010, }, /* ncpu */
{"ninep", 17013, }, /* cpu */
- {0},
+ {0}
};
static void
@@ -143,5 +143,5 @@ Proto il =
p_mux,
"%lud",
p_fields,
- defaultframer,
+ defaultframer
};
diff --git a/src/cmd/ip/snoopy/ip.c b/src/cmd/ip/snoopy/ip.c
index fe836eba..234ca85f 100755
--- a/src/cmd/ip/snoopy/ip.c
+++ b/src/cmd/ip/snoopy/ip.c
@@ -129,10 +129,10 @@ static Mux p_mux[] =
enum
{
- Os, // source
- Od, // destination
- Osd, // source or destination
- Ot, // type
+ Os, /* source */
+ Od, /* destination */
+ Osd, /* source or destination */
+ Ot, /* type */
};
static Field p_fields[] =
@@ -233,5 +233,5 @@ Proto ip =
p_mux,
"%lud",
p_fields,
- defaultframer,
+ defaultframer
};
diff --git a/src/cmd/ip/snoopy/ip6.c b/src/cmd/ip/snoopy/ip6.c
index eea4ba0d..7187cda7 100755
--- a/src/cmd/ip/snoopy/ip6.c
+++ b/src/cmd/ip/snoopy/ip6.c
@@ -23,7 +23,7 @@ enum
ROUT_HDR = 43,
FRAG_HDR = 44,
FRAG_HSZ = 8, /* in bytes */
- DEST_HDR = 60,
+ DEST_HDR = 60
};
static Mux p_mux[] =
@@ -126,10 +126,10 @@ static Mux p_mux[] =
enum
{
- Os, // source
- Od, // destination
- Osd, // source or destination
- Ot, // type
+ Os, /* source */
+ Od, /* destination */
+ Osd, /* source or destination */
+ Ot, /* type */
};
static Field p_fields[] =
@@ -306,5 +306,5 @@ Proto ip6 =
p_mux,
"%lud",
p_fields,
- defaultframer,
+ defaultframer
};
diff --git a/src/cmd/ip/snoopy/main.c b/src/cmd/ip/snoopy/main.c
index cf43e5c0..f7bf0b1a 100755
--- a/src/cmd/ip/snoopy/main.c
+++ b/src/cmd/ip/snoopy/main.c
@@ -20,7 +20,7 @@ char *prom = "promiscuous";
enum
{
Pktlen= 64*1024,
- Blen= 16*1024,
+ Blen= 16*1024
};
Filter *filter;
diff --git a/src/cmd/ip/snoopy/ninep.c b/src/cmd/ip/snoopy/ninep.c
index a3e40d34..eb3eab39 100755
--- a/src/cmd/ip/snoopy/ninep.c
+++ b/src/cmd/ip/snoopy/ninep.c
@@ -38,5 +38,5 @@ Proto ninep =
nil,
nil,
nil,
- defaultframer,
+ defaultframer
};
diff --git a/src/cmd/ip/snoopy/ospf.c b/src/cmd/ip/snoopy/ospf.c
index 10da17cd..bb4cd893 100755
--- a/src/cmd/ip/snoopy/ospf.c
+++ b/src/cmd/ip/snoopy/ospf.c
@@ -30,7 +30,7 @@ enum
OSPFdd= 2,
OSPFlsrequest= 3,
OSPFlsupdate= 4,
- OSPFlsack= 5,
+ OSPFlsack= 5
};
@@ -39,7 +39,7 @@ char *ospftype[] = {
[OSPFdd] "data definition",
[OSPFlsrequest] "link state request",
[OSPFlsupdate] "link state update",
- [OSPFlsack] "link state ack",
+ [OSPFlsack] "link state ack"
};
char*
@@ -115,7 +115,7 @@ char *lsatype[] = {
[LSANetwork] "Network LSA",
[LSASummN] "Summary LSA (Network)",
[LSASummR] "Summary LSA (Router)",
- [LSAASext] "LSA AS external",
+ [LSAASext] "LSA AS external"
};
char*
@@ -386,5 +386,5 @@ Proto ospf =
nil,
nil,
nil,
- defaultframer,
+ defaultframer
};
diff --git a/src/cmd/ip/snoopy/ppp.c b/src/cmd/ip/snoopy/ppp.c
index 3c36e437..9319cdae 100755
--- a/src/cmd/ip/snoopy/ppp.c
+++ b/src/cmd/ip/snoopy/ppp.c
@@ -90,7 +90,7 @@ enum
Oipdns= 129,
Oipwins= 130,
Oipdns2= 131,
- Oipwins2= 132,
+ Oipwins2= 132
};
char *
@@ -110,7 +110,7 @@ lcpcode[] = {
"id",
"timeremain",
"resetreq",
- "resetack",
+ "resetack"
};
static Mux p_mux[] =
@@ -126,12 +126,12 @@ static Mux p_mux[] =
{"ppp_lcp", PPP_lcp, },
{"ppp_lqm", PPP_lqm, },
{"ppp_chap", PPP_chap, },
- {0},
+ {0}
};
enum
{
- OOproto,
+ OOproto
};
static void
@@ -571,7 +571,7 @@ Proto ppp =
p_mux,
"%#.4lux",
nil,
- defaultframer,
+ defaultframer
};
Proto ppp_ipcp =
@@ -583,7 +583,7 @@ Proto ppp_ipcp =
nil,
nil,
nil,
- defaultframer,
+ defaultframer
};
Proto ppp_lcp =
@@ -595,7 +595,7 @@ Proto ppp_lcp =
nil,
nil,
nil,
- defaultframer,
+ defaultframer
};
Proto ppp_ccp =
@@ -607,7 +607,7 @@ Proto ppp_ccp =
nil,
nil,
nil,
- defaultframer,
+ defaultframer
};
Proto ppp_chap =
@@ -619,7 +619,7 @@ Proto ppp_chap =
nil,
nil,
nil,
- defaultframer,
+ defaultframer
};
Proto ppp_comp =
@@ -631,5 +631,5 @@ Proto ppp_comp =
nil,
nil,
nil,
- defaultframer,
+ defaultframer
};
diff --git a/src/cmd/ip/snoopy/pppoe_disc.c b/src/cmd/ip/snoopy/pppoe_disc.c
index c8a5aeba..058f059d 100755
--- a/src/cmd/ip/snoopy/pppoe_disc.c
+++ b/src/cmd/ip/snoopy/pppoe_disc.c
@@ -27,7 +27,7 @@ enum
Overs,
Otype,
Ocode,
- Osess,
+ Osess
};
static Field p_fields[] =
@@ -42,7 +42,7 @@ static Field p_fields[] =
static void
p_compilesess(Filter *f)
{
-// Mux *m;
+/* Mux *m; */
if(f->op == '='){
compile_cmp(pppoe_sess.name, f, p_fields);
@@ -62,7 +62,7 @@ p_compilesess(Filter *f)
static void
p_compiledisc(Filter *f)
{
-// Mux *m;
+/* Mux *m; */
if(f->op == '='){
compile_cmp(pppoe_disc.name, f, p_fields);
diff --git a/src/cmd/ip/snoopy/protos.c b/src/cmd/ip/snoopy/protos.c
index 4cf78e27..4503f7f0 100644
--- a/src/cmd/ip/snoopy/protos.c
+++ b/src/cmd/ip/snoopy/protos.c
@@ -29,5 +29,5 @@ Proto *protos[] =
&ppp_ipcp,
&pppoe_sess,
&pppoe_disc,
- 0,
+ 0
};
diff --git a/src/cmd/ip/snoopy/rtcp.c b/src/cmd/ip/snoopy/rtcp.c
index 939f78db..29745d65 100755
--- a/src/cmd/ip/snoopy/rtcp.c
+++ b/src/cmd/ip/snoopy/rtcp.c
@@ -6,29 +6,29 @@
typedef struct Hdr Hdr;
struct Hdr {
- uchar hdr; // RTCP header
- uchar pt; // Packet type
- uchar len[2]; // Report length
- uchar ssrc[4]; // Synchronization source identifier
- uchar ntp[8]; // NTP time stamp
- uchar rtp[4]; // RTP time stamp
- uchar pktc[4]; // Sender's packet count
- uchar octc[4]; // Sender's octect count
+ uchar hdr; /* RTCP header */
+ uchar pt; /* Packet type */
+ uchar len[2]; /* Report length */
+ uchar ssrc[4]; /* Synchronization source identifier */
+ uchar ntp[8]; /* NTP time stamp */
+ uchar rtp[4]; /* RTP time stamp */
+ uchar pktc[4]; /* Sender's packet count */
+ uchar octc[4]; /* Sender's octect count */
};
typedef struct Report Report;
struct Report {
- uchar ssrc[4]; // SSRC identifier
- uchar lost[4]; // Fraction + cumu lost
- uchar seqhi[4]; // Highest seq number received
- uchar jitter[4]; // Interarrival jitter
- uchar lsr[4]; // Last SR
- uchar dlsr[4]; // Delay since last SR
+ uchar ssrc[4]; /* SSRC identifier */
+ uchar lost[4]; /* Fraction + cumu lost */
+ uchar seqhi[4]; /* Highest seq number received */
+ uchar jitter[4]; /* Interarrival jitter */
+ uchar lsr[4]; /* Last SR */
+ uchar dlsr[4]; /* Delay since last SR */
};
enum{
- RTCPLEN = 28, // Minimum size of an RTCP header
- REPORTLEN = 24,
+ RTCPLEN = 28, /* Minimum size of an RTCP header */
+ REPORTLEN = 24
};
static int
@@ -79,5 +79,5 @@ Proto rtcp = {
nil,
nil,
nil,
- defaultframer,
+ defaultframer
};
diff --git a/src/cmd/ip/snoopy/rtp.c b/src/cmd/ip/snoopy/rtp.c
index e9160711..1aef15fa 100755
--- a/src/cmd/ip/snoopy/rtp.c
+++ b/src/cmd/ip/snoopy/rtp.c
@@ -6,15 +6,15 @@
typedef struct Hdr Hdr;
struct Hdr {
- uchar hdr; // RTP header
- uchar marker; // Payload and marker
- uchar seq[2]; // Sequence number
- uchar ts[4]; // Time stamp
- uchar ssrc[4]; // Synchronization source identifier
+ uchar hdr; /* RTP header */
+ uchar marker; /* Payload and marker */
+ uchar seq[2]; /* Sequence number */
+ uchar ts[4]; /* Time stamp */
+ uchar ssrc[4]; /* Synchronization source identifier */
};
enum{
- RTPLEN = 12, // Minimum size of an RTP header
+ RTPLEN = 12, /* Minimum size of an RTP header */
};
static int
@@ -58,5 +58,5 @@ Proto rtp = {
nil,
nil,
nil,
- defaultframer,
+ defaultframer
};
diff --git a/src/cmd/ip/snoopy/tcp.c b/src/cmd/ip/snoopy/tcp.c
index 1e7f0793..b8ea7e40 100755
--- a/src/cmd/ip/snoopy/tcp.c
+++ b/src/cmd/ip/snoopy/tcp.c
@@ -29,14 +29,14 @@ typedef struct PseudoHdr{
enum
{
- TCPLEN= 20,
+ TCPLEN= 20
};
enum
{
Os,
Od,
- Osd,
+ Osd
};
static Field p_fields[] =
@@ -55,7 +55,7 @@ static Mux p_mux[] =
{"ninep", 17005, }, /* ocpu */
{"ninep", 17010, }, /* ncpu */
{"ninep", 17013, }, /* cpu */
- {0},
+ {0}
};
enum
@@ -204,7 +204,7 @@ p_seprint(Msg *m)
}
if(Cflag){
- // editing in progress by ehg
+ /* editing in progress by ehg */
}
return 0;
}
@@ -218,5 +218,5 @@ Proto tcp =
p_mux,
"%lud",
p_fields,
- defaultframer,
+ defaultframer
};
diff --git a/src/cmd/ip/snoopy/udp.c b/src/cmd/ip/snoopy/udp.c
index a83c6f13..fc68d6f3 100755
--- a/src/cmd/ip/snoopy/udp.c
+++ b/src/cmd/ip/snoopy/udp.c
@@ -15,7 +15,7 @@ struct Hdr
enum
{
- UDPLEN= 8,
+ UDPLEN= 8
};
enum
@@ -23,7 +23,7 @@ enum
Os,
Od,
Osd,
- Osetport,
+ Osetport
};
static Field p_fields[] =
@@ -43,7 +43,7 @@ static Mux p_mux[] =
{"ninep", 6346, }, /* tvs */
{"rtp", ANYPORT, },
{"rtcp", ANYPORT, },
- {0},
+ {0}
};
/* default next protocol, can be changed by p_filter, reset by p_compile */
@@ -128,5 +128,5 @@ Proto udp =
p_mux,
"%lud",
p_fields,
- defaultframer,
+ defaultframer
};