Use gcc -ansi -pedantic in 9c. Fix many non-C89-isms.
This commit is contained in:
parent
226d80b821
commit
cbeb0b26e4
492 changed files with 3218 additions and 3167 deletions
|
|
@ -126,7 +126,7 @@ enum {
|
|||
Srequesting,
|
||||
Sbound,
|
||||
Srenewing,
|
||||
Srebinding,
|
||||
Srebinding
|
||||
};
|
||||
|
||||
typedef struct Bootp Bootp;
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
enum
|
||||
{
|
||||
Maxstr= 256,
|
||||
Maxstr= 256
|
||||
};
|
||||
|
||||
typedef struct Binding Binding;
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ enum
|
|||
InfoReply = 16,
|
||||
|
||||
ICMP_IPSIZE = 20,
|
||||
ICMP_HDRSIZE = 8,
|
||||
ICMP_HDRSIZE = 8
|
||||
};
|
||||
|
||||
static void
|
||||
|
|
|
|||
|
|
@ -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
|
||||
};
|
||||
|
|
|
|||
|
|
@ -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
|
||||
};
|
||||
|
|
|
|||
|
|
@ -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
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -75,5 +75,5 @@ Proto dump =
|
|||
nil,
|
||||
nil,
|
||||
nil,
|
||||
defaultframer,
|
||||
defaultframer
|
||||
};
|
||||
|
|
|
|||
|
|
@ -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[] =
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
};
|
||||
|
|
|
|||
|
|
@ -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
|
||||
};
|
||||
|
|
|
|||
|
|
@ -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
|
||||
};
|
||||
|
|
|
|||
|
|
@ -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
|
||||
};
|
||||
|
|
|
|||
|
|
@ -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
|
||||
};
|
||||
|
|
|
|||
|
|
@ -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
|
||||
};
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ char *prom = "promiscuous";
|
|||
enum
|
||||
{
|
||||
Pktlen= 64*1024,
|
||||
Blen= 16*1024,
|
||||
Blen= 16*1024
|
||||
};
|
||||
|
||||
Filter *filter;
|
||||
|
|
|
|||
|
|
@ -38,5 +38,5 @@ Proto ninep =
|
|||
nil,
|
||||
nil,
|
||||
nil,
|
||||
defaultframer,
|
||||
defaultframer
|
||||
};
|
||||
|
|
|
|||
|
|
@ -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
|
||||
};
|
||||
|
|
|
|||
|
|
@ -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
|
||||
};
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -29,5 +29,5 @@ Proto *protos[] =
|
|||
&ppp_ipcp,
|
||||
&pppoe_sess,
|
||||
&pppoe_disc,
|
||||
0,
|
||||
0
|
||||
};
|
||||
|
|
|
|||
|
|
@ -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
|
||||
};
|
||||
|
|
|
|||
|
|
@ -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
|
||||
};
|
||||
|
|
|
|||
|
|
@ -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
|
||||
};
|
||||
|
|
|
|||
|
|
@ -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
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue