]> git.ipfire.org Git - thirdparty/iproute2.git/commitdiff
ip: remove leftovers from IPX and DECnet
authorStephen Hemminger <stephen@networkplumber.org>
Wed, 1 Sep 2021 21:03:53 +0000 (14:03 -0700)
committerStephen Hemminger <stephen@networkplumber.org>
Wed, 1 Sep 2021 21:03:53 +0000 (14:03 -0700)
Iproute2 has not supported DECnet or IPX since version 5.0.
There were some leftover support in the ip options flags
and parsing, remove these.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
include/utils.h
ip/ip.c
ip/ipneigh.c
lib/utils.c
man/man8/ip.8

index 28eaad8e830345d2c6b9c95632cc3fbbbb928d00..c984946138b4ab90d176a61496a06ba49be4c197 100644 (file)
@@ -109,17 +109,6 @@ static inline bool is_addrtype_inet_not_multi(const inet_prefix *p)
        return (p->flags & ADDRTYPE_INET_MULTI) == ADDRTYPE_INET;
 }
 
-#define DN_MAXADDL 20
-#ifndef AF_DECnet
-#define AF_DECnet 12
-#endif
-
-struct dn_naddr
-{
-        unsigned short          a_len;
-        unsigned char a_addr[DN_MAXADDL];
-};
-
 #ifndef AF_MPLS
 # define AF_MPLS 28
 #endif
diff --git a/ip/ip.c b/ip/ip.c
index e7ffeaff3391ffccc5cbf42d193740baa466ea55..b07a5c7d23d882575b8796137a622165b1c25313 100644 (file)
--- a/ip/ip.c
+++ b/ip/ip.c
@@ -72,7 +72,7 @@ static void usage(void)
                "       OPTIONS := { -V[ersion] | -s[tatistics] | -d[etails] | -r[esolve] |\n"
                "                    -h[uman-readable] | -iec | -j[son] | -p[retty] |\n"
                "                    -f[amily] { inet | inet6 | mpls | bridge | link } |\n"
-               "                    -4 | -6 | -I | -D | -M | -B | -0 |\n"
+               "                    -4 | -6 | -M | -B | -0 |\n"
                "                    -l[oops] { maximum-addr-flush-attempts } | -br[ief] |\n"
                "                    -o[neline] | -t[imestamp] | -ts[hort] | -b[atch] [filename] |\n"
                "                    -rc[vbuf] [size] | -n[etns] name | -N[umeric] | -a[ll] |\n"
@@ -224,8 +224,6 @@ int main(int argc, char **argv)
                        preferred_family = AF_INET6;
                } else if (strcmp(opt, "-0") == 0) {
                        preferred_family = AF_PACKET;
-               } else if (strcmp(opt, "-D") == 0) {
-                       preferred_family = AF_DECnet;
                } else if (strcmp(opt, "-M") == 0) {
                        preferred_family = AF_MPLS;
                } else if (strcmp(opt, "-B") == 0) {
index 95bde520fbfc60d34abb706c823839a5323bff31..b778de00b242e29bc473956a966c89b215592da8 100644 (file)
@@ -328,8 +328,7 @@ int print_neigh(struct nlmsghdr *n, void *arg)
        if (!(filter.state&r->ndm_state) &&
            !(r->ndm_flags & NTF_PROXY) &&
            !(r->ndm_flags & NTF_EXT_LEARNED) &&
-           (r->ndm_state || !(filter.state&0x100)) &&
-           (r->ndm_family != AF_DECnet))
+           (r->ndm_state || !(filter.state&0x100)))
                return 0;
 
        if (filter.master && !(n->nlmsg_flags & NLM_F_DUMP_FILTERED)) {
index 0559923beced37da1d2e1ae01fb38840882232b1..53d3100602848472e42a37c718285be4326bde6c 100644 (file)
@@ -540,7 +540,7 @@ static int __get_addr_1(inet_prefix *addr, const char *name, int family)
        memset(addr, 0, sizeof(*addr));
 
        if (strcmp(name, "default") == 0) {
-               if ((family == AF_DECnet) || (family == AF_MPLS))
+               if (family == AF_MPLS)
                        return -1;
                addr->family = family;
                addr->bytelen = af_byte_len(addr->family);
@@ -551,7 +551,7 @@ static int __get_addr_1(inet_prefix *addr, const char *name, int family)
 
        if (strcmp(name, "all") == 0 ||
            strcmp(name, "any") == 0) {
-               if ((family == AF_DECnet) || (family == AF_MPLS))
+               if (family == AF_MPLS)
                        return -1;
                addr->family = family;
                addr->bytelen = 0;
@@ -636,10 +636,6 @@ int af_bit_len(int af)
                return 128;
        case AF_INET:
                return 32;
-       case AF_DECnet:
-               return 16;
-       case AF_IPX:
-               return 80;
        case AF_MPLS:
                return 20;
        }
@@ -729,16 +725,6 @@ int get_addr_rta(inet_prefix *dst, const struct rtattr *rta, int family)
                dst->bytelen = 16;
                memcpy(dst->data, data, 16);
                break;
-       case 2:
-               dst->family = AF_DECnet;
-               dst->bytelen = 2;
-               memcpy(dst->data, data, 2);
-               break;
-       case 10:
-               dst->family = AF_IPX;
-               dst->bytelen = 10;
-               memcpy(dst->data, data, 10);
-               break;
        default:
                return -1;
        }
@@ -1029,8 +1015,6 @@ int read_family(const char *name)
                family = AF_INET6;
        else if (strcmp(name, "link") == 0)
                family = AF_PACKET;
-       else if (strcmp(name, "ipx") == 0)
-               family = AF_IPX;
        else if (strcmp(name, "mpls") == 0)
                family = AF_MPLS;
        else if (strcmp(name, "bridge") == 0)
@@ -1046,8 +1030,6 @@ const char *family_name(int family)
                return "inet6";
        if (family == AF_PACKET)
                return "link";
-       if (family == AF_IPX)
-               return "ipx";
        if (family == AF_MPLS)
                return "mpls";
        if (family == AF_BRIDGE)
index c3598a022fa2e20a0f4395ab1ae6a79f795aa280..2a4848b785f02cfb30bba6960267b68be7344b79 100644 (file)
@@ -37,8 +37,6 @@ ip \- show / manipulate routing, network devices, interfaces and tunnels
 .BR inet " | " inet6 " | " link " } | "
 \fB-4\fR |
 \fB-6\fR |
-\fB-I\fR |
-\fB-D\fR |
 \fB-B\fR |
 \fB-0\fR |
 \fB-l\fR[\fIoops\fR] { \fBmaximum-addr-flush-attempts\fR } |