FreeBSD Bugzilla – Attachment 6738 Details for
Bug 15073
[PATCH] additional command for user-level ppp to show urgent (prioritized) ports
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
file.diff
file.diff (text/plain), 2.56 KB, created by
sobomax
on 1999-11-24 14:10:01 UTC
(
hide
)
Description:
file.diff
Filename:
MIME Type:
Creator:
sobomax
Created:
1999-11-24 14:10:01 UTC
Size:
2.56 KB
patch
obsolete
>diff -ruN /usr/current/src/usr.sbin/ppp/command.c ppp/command.c >--- /usr/current/src/usr.sbin/ppp/command.c Thu Nov 18 10:32:06 1999 >+++ ppp/command.c Wed Nov 24 15:46:27 1999 >@@ -752,6 +752,16 @@ > return 0; > } > >+static int >+ShowUrgent(struct cmdargs const *arg) >+{ >+ prompt_Printf(arg->prompt,"TCP:\n"); >+ ipcp_ListUrgentTcpPorts(&arg->bundle->ncp.ipcp, arg->prompt); >+ prompt_Printf(arg->prompt,"\nUDP:\n"); >+ ipcp_ListUrgentUdpPorts(&arg->bundle->ncp.ipcp, arg->prompt); >+ return 0; >+} >+ > static struct cmdtab const ShowCommands[] = { > {"bundle", NULL, bundle_ShowStatus, LOCAL_AUTH, > "bundle details", "show bundle"}, >@@ -793,6 +803,8 @@ > "STOPPED timeout", "show stopped"}, > {"timers", NULL, ShowTimerList, LOCAL_AUTH, > "alarm timers", "show timers"}, >+ {"urgent", NULL, ShowUrgent, LOCAL_AUTH, >+ "urgent ports", "show urgent"}, > {"version", NULL, ShowVersion, LOCAL_NO_AUTH | LOCAL_AUTH, > "version string", "show version"}, > {"who", NULL, log_ShowWho, LOCAL_AUTH, >diff -ruN /usr/current/src/usr.sbin/ppp/ipcp.c ppp/ipcp.c >--- /usr/current/src/usr.sbin/ppp/ipcp.c Wed Sep 22 06:49:15 1999 >+++ ppp/ipcp.c Wed Nov 24 15:57:02 1999 >@@ -119,6 +119,15 @@ > } > > void >+ipcp_ListUrgentPorts(struct port_range *range, struct prompt *prompt) >+{ >+ int f; >+ >+ for (f = 0; f < range->nports; f++) >+ prompt_Printf(prompt, " %d\n", range->port[f]); >+} >+ >+void > ipcp_AddUrgentPort(struct port_range *range, u_short port) > { > u_short *newport; >diff -ruN /usr/current/src/usr.sbin/ppp/ipcp.h ppp/ipcp.h >--- /usr/current/src/usr.sbin/ppp/ipcp.h Wed Sep 8 09:09:02 1999 >+++ ppp/ipcp.h Wed Nov 24 15:46:27 1999 >@@ -129,6 +129,7 @@ > extern void ipcp_CleanInterface(struct ipcp *); > extern int ipcp_InterfaceUp(struct ipcp *); > extern int ipcp_IsUrgentPort(struct port_range *, u_short, u_short); >+extern void ipcp_ListUrgentPorts(struct port_range *, struct prompt *); > 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 *); >@@ -138,6 +139,10 @@ > ipcp_IsUrgentPort(&(ipcp)->cfg.urgent.tcp, p1, p2) > #define ipcp_IsUrgentUdpPort(ipcp, p1, p2) \ > ipcp_IsUrgentPort(&(ipcp)->cfg.urgent.udp, p1, p2) >+#define ipcp_ListUrgentTcpPorts(ipcp, p) \ >+ ipcp_ListUrgentPorts(&(ipcp)->cfg.urgent.tcp, p); >+#define ipcp_ListUrgentUdpPorts(ipcp, p) \ >+ ipcp_ListUrgentPorts(&(ipcp)->cfg.urgent.udp, p); > #define ipcp_AddUrgentTcpPort(ipcp, p) \ > ipcp_AddUrgentPort(&(ipcp)->cfg.urgent.tcp, p) > #define ipcp_AddUrgentUdpPort(ipcp, p) \
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 15073
: 6738