netstat 1.42 patch adding ROSE support
Subsystems (3)
PATCH 1/1 netstat 1.42 patch adding ROSE support
Hi,
In netstat README file one can read :
"route/netstat -r do not yet support different address families cleanly. IPX/DDP/AX25 people, please feel free to add the code."
This is why I am sending this patch against netstat v 1.42 included in net-tools 1.60-23. The patch adds AMPR ROSE address family support as may be seen here :
[root@f6bvp-11 net-tools-1.60-23]# netstat -V
net-tools 1.60
netstat 1.42 (2001-04-15)
Fred Baumgarten, Alan Cox, Bernd Eckenfels, Phil Blundell, Tuan Hoang and others
+NEW_ADDRT +RTF_IRTT +RTF_REJECT -FW_MASQUERADE -I18N
AF: (inet) +UNIX +INET -INET6 -IPX +AX25 +NETROM -X25 -ATALK -ECONET +ROSE HW: +ETHER -ARC -SLIP -PPP -TUNNEL -TR +AX25 +NETROM -X25 -FR +ROSE -ASH -SIT -FDDI -HIPPI -HDLC/LAPB
[root@f6bvp-11 net-tools-1.60-23]# netstat -h
usage: netstat [-veenNcCF] [<Af>] -r netstat {-V|--version|-h|--help}
------
------
<Socket>={-t|--tcp} {-u|--udp} {-w|--raw} {-x|--unix} --ax25 --ipx --netrom --rose
<AF>=Use '-A <af>' or '--<af>'; default: inet
List of possible address families (which support routing):
inet (DARPA Internet) ax25 (AMPR AX.25) netrom (AMPR NET/ROM)
rose (AMPR ROSE)
[root@f6bvp-11 net-tools-1.60-23]# netstat --rose
Active ROSE sockets
dest_addr dest_call src_addr src_call dev lci neigh state 2080175520 WP-0 2080175502 WP-0 rose0 32 16 ESTABLISHED * * 2080175502 FE6BVP-1 rose0 0 0 LISTENING 2080175520 F6BVP-1 2080175502 F6BVP-12 rose0 0 0 LISTENING 2080175502 FPAD-0 2080175502 WP-0 rose0 32 1 ESTABLISHED 2080428501 F4BWT-10 2080175502 F6BVP-0 rose0 0 0 LISTENING * * 2080175502 ROUTE-0 rose0 0 0 LISTENING * * 2080175502 F6BVP-15 rose0 0 0 LISTENING * * 2080175502 WP-0 rose0 0 0 LISTENING 2080175502 WP-0 2080175502 FPAD-0 rose0 1 1 ESTABLISHED * * 2080175502 ??????-? rose0 0 0 LISTENING
Bernard Pidoux
config.in +2 -2
@@ -54,7 +54,7 @@ bool 'Appletalk DDP protocol family' HAVE_AFATALK y bool 'AX25 (packet radio) protocol family' HAVE_AFAX25 y bool 'NET/ROM (packet radio) protocol family' HAVE_AFNETROM y -bool 'Rose (packet radio) protocol family' HAVE_AFROSE n +bool 'Rose (packet radio) protocol family' HAVE_AFROSE y bool 'X.25 (CCITT) protocol family' HAVE_AFX25 y bool 'Econet protocol family' HAVE_AFECONET n bool 'DECnet protocol family' HAVE_AFDECnet n
@@ -71,7 +71,7 @@ bool 'STRIP (Metricom radio) support' HAVE_HWSTRIP y bool 'Token ring (generic) support' HAVE_HWTR y bool 'AX25 (packet radio) support' HAVE_HWAX25 y -bool 'Rose (packet radio) support' HAVE_HWROSE n +bool 'Rose (packet radio) support' HAVE_HWROSE y bool 'NET/ROM (packet radio) support' HAVE_HWNETROM y bool 'X.25 (generic) support' HAVE_HWX25 y bool 'DLCI/FRAD (frame relay) support' HAVE_HWFR y
lib/af.c +5 -0
@@ -32,6 +32,7 @@int flag_ax25;int flag_ddp;int flag_netrom; +int flag_rose;int flag_inet;int flag_inet6;int flag_econet;
@@ -64,6 +65,9 @@"netrom" ,"netrom" , &flag_netrom }, { +"rose" ,"rose" , &flag_rose + }, + {"inet" ,"inet" , &flag_inet }, {
@@ -100,6 +104,7 @@extern struct aftype inet6_aftype;extern struct aftype ax25_aftype;extern struct aftype netrom_aftype; +extern struct aftype rose_aftype;extern struct aftype ipx_aftype;extern struct aftype ddp_aftype;extern struct aftype ec_aftype;
lib/getroute.c +4 -0
@@ -44,6 +44,7 @@extern struct aftype inet6_aftype;extern struct aftype ax25_aftype;extern struct aftype netrom_aftype; +extern struct aftype rose_aftype;extern struct aftype ipx_aftype;extern struct aftype ddp_aftype;extern struct aftype x25_aftype;
@@ -59,6 +60,9 @@#if HAVE_AFNETROM netrom_aftype.rprint = NETROM_rprint;#endif +#if HAVE_AFROSE + rose_aftype.rprint = ROSE_rprint; +#endif #if HAVE_AFAX25 ax25_aftype.rprint = AX25_rprint;#endif
lib/net-support.h +4 -0
@@ -109,6 +109,7 @@extern int DDP_rprint (int options);extern int IPX_rprint (int options);extern int NETROM_rprint (int options); +extern int ROSE_rprint (int options);extern int AX25_rprint (int options);extern int X25_rprint (int options);
@@ -117,6 +118,7 @@extern int DDP_rinput (int action,int flags,char **argv);extern int IPX_rinput (int action,int flags,char **argv);extern int NETROM_rinput (int action,int flags,char **argv); +extern int ROSE_rinput (int action,int flags,char **argv);extern int AX25_rinput (int action,int flags,char **argv);extern int X25_rinput (int action,int flags,char **argv);
@@ -130,6 +132,7 @@extern int flag_ax25;extern int flag_ddp;extern int flag_netrom; +extern int flag_rose;extern int flag_x25;extern int flag_inet;extern int flag_inet6;
@@ -143,6 +146,7 @@ {"ipx", 0, 0, 1}, \ {"appletalk", 0, 0, 1}, \ {"netrom", 0, 0, 1}, \ + {"rose", 0, 0, 1}, \ {"inet", 0, 0, 1}, \ {"inet6", 0, 0, 1}, \ {"ddp", 0, 0, 1}, \
lib/pathnames.h +3 -0
@@ -41,6 +41,9 @@#define _PATH_PROCNET_DEV "/proc/net/dev"#define _PATH_PROCNET_RARP "/proc/net/rarp"#define _PATH_ETHERS "/etc/ethers" +#define _PATH_PROCNET_ROSE "/proc/net/rose" +#define _PATH_PROCNET_ROSE_NEIGH "/proc/net/rose_neigh" +#define _PATH_PROCNET_ROSE_NODES "/proc/net/rose_nodes"#define _PATH_PROCNET_ROSE_ROUTE "/proc/net/rose_routes"#define _PATH_PROCNET_X25 "/proc/net/x25"#define _PATH_PROCNET_X25_ROUTE "/proc/net/x25_routes"
lib/rose_gr.c +39 -15
72 lines not on this page · raw message
netstat.c +59 -2
94 lines not on this page · raw message
po/fr.po +14 -6
@@ -797,7 +797,7 @@ #: ../netstat.c:394 ../netstat.c:1089 ../netstat.c:1166 msgid "LISTENING" -msgstr "LISTENING" +msgstr "ECOUTE" #: ../netstat.c:395 msgid "CONN SENT"
@@ -809,11 +809,19 @@ #: ../netstat.c:397 ../netstat.c:464 ../netstat.c:809 ../netstat.c:1169 msgid "ESTABLISHED" -msgstr "ESTABLISHED" +msgstr "ETABLIE" -#: ../netstat.c:419 +#: ../netstat.c:467 msgid "Active NET/ROM sockets\n" -msgstr "sockets NET/ROM actives\n" +msgstr "Prises (sockets) NET/ROM actives\n" + +#: ../netstat.c:521 +msgid "Active ROSE sockets\n" +msgstr "Prises (sockets) ROSE actives\n" + +#: ../netstat.c:522 +msgid "dest_addr dest_call src_addr src_call dev lci neigh state\n" +msgstr "Destinat call_dest Source call_src Periph lci Voisin Etat \n" #: ../netstat.c:420 msgid ""
@@ -826,7 +834,7 @@ #: ../netstat.c:430 ../netstat.c:1208 #, c-format msgid "Problem reading data from %s\n" -msgstr "" +msgstr "Ne peut lire les donn�es de %s\n" #: ../netstat.c:465 msgid "SYN_SENT"
@@ -1008,7 +1016,7 @@ #: ../netstat.c:1184 msgid "Active AX.25 sockets\n" -msgstr "Sockets AX.25 actives\n" +msgstr "Prises (sockets) AX.25 actives\n" #: ../netstat.c:1185 msgid "Dest Source Device State Vr/Vs Send-Q Recv-Q\n"