diff options
author | brian <brian@FreeBSD.org> | 1999-09-07 07:51:11 +0000 |
---|---|---|
committer | brian <brian@FreeBSD.org> | 1999-09-07 07:51:11 +0000 |
commit | 3157f75de6e4532150d0b35078d74babbdd069a8 (patch) | |
tree | 8bc4d81a67b32c857db64e126d8688e10d926482 /usr.sbin/ppp/ipcp.h | |
parent | 3e1d9f25c8a992fb915d18ffaccb3a266e8ad0a4 (diff) | |
download | FreeBSD-src-3157f75de6e4532150d0b35078d74babbdd069a8.zip FreeBSD-src-3157f75de6e4532150d0b35078d74babbdd069a8.tar.gz |
Introduce a forth IP packet queue. Urgent packets with
ip_tos == IPTOS_LOWDELAY now get precidence over urgent
packets with ip_tos != IPTOS_LOWDELAY and non-urgent packets
with ip_tos == IPTOS_LOWDELAY.
Enhance the ``set urgent'' syntax to allow for urgent UDP
packets as well as urgent TCP packets.
Diffstat (limited to 'usr.sbin/ppp/ipcp.h')
-rw-r--r-- | usr.sbin/ppp/ipcp.h | 37 |
1 files changed, 29 insertions, 8 deletions
diff --git a/usr.sbin/ppp/ipcp.h b/usr.sbin/ppp/ipcp.h index 586efeb..78e3c9e 100644 --- a/usr.sbin/ppp/ipcp.h +++ b/usr.sbin/ppp/ipcp.h @@ -42,6 +42,12 @@ struct in_range { int width; }; +struct port_range { + unsigned nports; /* How many ports */ + unsigned maxports; /* How many allocated (malloc) ports */ + u_short *port; /* The actual ports */ +}; + struct ipcp { struct fsm fsm; /* The finite state machine */ @@ -70,9 +76,7 @@ struct ipcp { } ns; struct { - unsigned nports; /* How many urgent ports */ - unsigned maxports; /* How many allocated urgent ports */ - u_short *port; /* The urgent ports */ + struct port_range tcp, udp; /* The range of urgent ports */ } urgent; struct fsm_retry fsm; /* How often/frequently to resend requests */ @@ -99,7 +103,7 @@ struct ipcp { u_int32_t my_reject; /* Request codes I have rejected */ struct pppThroughput throughput; /* throughput statistics */ - struct mqueue Queue[3]; /* Output packet queues */ + struct mqueue Queue[4]; /* Output packet queues */ }; #define fsm2ipcp(fp) (fp->proto == PROTO_IPCP ? (struct ipcp *)fp : NULL) @@ -124,8 +128,25 @@ extern int ipcp_UseHisaddr(struct bundle *, const char *, int); extern int ipcp_vjset(struct cmdargs const *); extern void ipcp_CleanInterface(struct ipcp *); extern int ipcp_InterfaceUp(struct ipcp *); -extern int ipcp_IsUrgentPort(struct ipcp *, u_short, u_short); -extern void ipcp_AddUrgentPort(struct ipcp *, u_short); -extern void ipcp_RemoveUrgentPort(struct ipcp *, u_short); -extern void ipcp_ClearUrgentPorts(struct ipcp *); +extern int ipcp_IsUrgentPort(struct port_range *, u_short, u_short); +extern void ipcp_AddUrgentPort(struct port_range *, u_short); +extern void ipcp_RemoveUrgentPort(struct port_range *, u_short); +extern void ipcp_ClearUrgentPorts(struct port_range *); extern struct in_addr addr2mask(struct in_addr); + +#define ipcp_IsUrgentTcpPort(ipcp, p1, p2) \ + ipcp_IsUrgentPort(&(ipcp)->cfg.urgent.tcp, p1, p2) +#define ipcp_IsUrgentUdpPort(ipcp, p1, p2) \ + ipcp_IsUrgentPort(&(ipcp)->cfg.urgent.udp, p1, p2) +#define ipcp_AddUrgentTcpPort(ipcp, p) \ + ipcp_AddUrgentPort(&(ipcp)->cfg.urgent.tcp, p) +#define ipcp_AddUrgentUdpPort(ipcp, p) \ + ipcp_AddUrgentPort(&(ipcp)->cfg.urgent.udp, p) +#define ipcp_RemoveUrgentTcpPort(ipcp, p) \ + ipcp_RemoveUrgentPort(&(ipcp)->cfg.urgent.tcp, p) +#define ipcp_RemoveUrgentUdpPort(ipcp, p) \ + ipcp_RemoveUrgentPort(&(ipcp)->cfg.urgent.udp, p) +#define ipcp_ClearUrgentTcpPorts(ipcp) \ + ipcp_ClearUrgentPorts(&(ipcp)->cfg.urgent.tcp) +#define ipcp_ClearUrgentUdpPorts(ipcp) \ + ipcp_ClearUrgentPorts(&(ipcp)->cfg.urgent.udp) |