In article <20080109161644.GB3584017%qnx.com@localhost>, Sean Boudreau <seanb%qnx.com@localhost> wrote: >-=-=-=-=-=- > > >Hi: > >arp(8) seems to have lost the ability to add / delete "proxy >only" entries (SIN_PROXY flag set). FWICT, this was the >purpose of the "pro" keyword that sort of got merged in with >the "pub" keyword with PR 32681. > >Here's a suggested diff. Any comments before I commit? > >-seanb > >-=-=-=-=-=- > >Index: arp.c >=================================================================== >RCS file: /cvsroot/src/usr.sbin/arp/arp.c,v >retrieving revision 1.45 >diff -u -r1.45 arp.c >--- arp.c 15 Dec 2007 19:44:54 -0000 1.45 >+++ arp.c 9 Jan 2008 21:05:51 -0000 >@@ -269,6 +269,10 @@ > else if (strncmp(argv[0], "pub", 3) == 0) { > flags |= RTF_ANNOUNCE; > doing_proxy = SIN_PROXY; >+ if (argc && strncmp(argv[1], "pro", 3) == 0) { >+ export_only = 1; >+ argc--; argv++; >+ } > } else if (strncmp(argv[0], "trail", 5) == 0) { > warnx("%s: Sending trailers is no longer supported", > host); >@@ -363,10 +367,10 @@ > sina = &sin_m; > rtm = &m_rtmsg.m_rtm; > >- if (info && strncmp(info, "pub", 3) == 0) >- export_only = 1; > getsocket(); > sin_m = blank_sin; /* struct copy */ >+ if (info && strncmp(info, "pro", 3) == 0) >+ sina->sin_other = SIN_PROXY; > if (getinetaddr(host, &sina->sin_addr) == -1) > return (1); > tryagain: >@@ -569,9 +573,9 @@ > progname = getprogname(); > (void)fprintf(stderr, "Usage: %s [-n] hostname\n", progname); > (void)fprintf(stderr, " %s [-nv] -a\n", progname); >- (void)fprintf(stderr, " %s [-v] -d [-a|hostname [pub]]\n", >+ (void)fprintf(stderr, " %s [-v] -d [-a|hostname [pub [pro]]]\n", > progname); >- (void)fprintf(stderr, " %s -s hostname ether_addr [temp] [pub]\n", >+ (void)fprintf(stderr, " %s -s hostname ether_addr [temp] [pub >[pro]]\n", > progname); > (void)fprintf(stderr, " %s -f filename\n", progname); > exit(1); >Index: arp.8 >=================================================================== >RCS file: /cvsroot/src/usr.sbin/arp/arp.8,v >retrieving revision 1.19 >diff -u -r1.19 arp.8 >--- arp.8 31 Jan 2006 17:47:04 -0000 1.19 >+++ arp.8 9 Jan 2008 21:05:51 -0000 >@@ -45,11 +45,15 @@ > .Nm > .Op Fl v > .Fl d >-.Op Fl a | Ar hostname >+.Fl a >+.Nm >+.Op Fl v >+.Fl d Ar hostname >+.Op Ar pro > .Nm > .Fl s Ar hostname ether_addr > .Op Ar temp >-.Op Ar pub >+.Op Ar pub Op Ar pro > .Nm > .Fl f Ar filename > .Sh DESCRIPTION >@@ -78,9 +82,9 @@ > .Fl d > flag. > If the >-.Cm pub >-keyword is specified, only the >-.Dq published >+.Cm pro >+keyword is specified, only the published >+.Dq proxy only > .Tn ARP > entry > for this host will be deleted. >@@ -127,7 +131,11 @@ > server, > responding to requests for > .Ar hostname >-even though the host address is not its own. >+even though the host address is not its own. If the word >+.Ar pro >+is also given, the published entry will be a >+.Dq proxy only >+entry. > .It Fl v > Display verbose information when adding or deleting > .Tn ARP Is there a reason not to call it "proxy"? christos