On Wed, May 27, 2015 at 05:21:52PM +0100, Paul Jakma wrote:
> So something like the below to go before your patch (probably a good few 
> of the types could be removed - I removed the ones that seemed obviously 
> defunct to me (EcoNet, Chaos, the Linux Prism driver type), probably a 
> good few more, if anyone knows - e.g. PRONet, ARCNet, MetriCom ??).

I'd prefer removing *way* more values, but another comment first:

> @@ -112,7 +112,9 @@ struct interface
>       struct sockaddr_storage sdl_storage;
>     };
>   #else
> -  unsigned short hw_type;
> +  /* Link-layer information */
> +  unsigned short ll_type;
> +#define hw_type ll_type
>     u_char hw_addr[INTERFACE_HWADDR_MAX];
>     int hw_addr_len;

I think we should have two fields: hw_addr_type, identifying the type of
information that hw_addr contains, and hw/ll_type, identifying the link
itself.

Rationale being, in rtadv/isisd, we don't care what the link type is, we
just have code that checks for an (ethernet) address and uses that.

In fact, the hw_addr_type would be sufficent at NONE or ETHER for now,
(maybe plus IP & IPV6 for tunnels).  We can add more when we actually
have code that does something sensible with it.

That said, for the list:

Keep:
> +      llts(ZEBRA_LLT_UNKNOWN,               "Unknown");
> +      llts(ZEBRA_LLT_ETHER,                 "Ethernet");
> +      llts(ZEBRA_LLT_IEEE1394,              "IEEE 1394 IPv4");
> +      llts(ZEBRA_LLT_INFINIBAND,            "InfiniBand");
> +      llts(ZEBRA_LLT_PPP,                   "PPP");
> +      llts(ZEBRA_LLT_IPIP,                  "IPIP Tunnel");
> +      llts(ZEBRA_LLT_IPIP6,                 "IPIP6 Tunnel");
> +      llts(ZEBRA_LLT_LOOPBACK,              "Loopback");
> +      llts(ZEBRA_LLT_SIT,                   "IPv6-in-IPv4 SIT");
> +      llts(ZEBRA_LLT_IPGRE,                 "GRE over IP");
> +      llts(ZEBRA_LLT_PIMREG,                "PIMSM registration");
> +      llts(ZEBRA_LLT_IEEE80211,             "IEEE 802.11");
> +      llts(ZEBRA_LLT_IEEE802154,            "IEEE 802.15.4");

Plus, as Timo said:
> +      llts(ZEBRA_LLT_IP6GRE,                "GRE over IPv6");

And possibly VXLAN & GENEVE.  Not sure about GRETAP?

(In a way, we don't do anything useful with *any* of the values, except
nhrpd wants to know if it's IPGRE or IP6GRE...)

Kill:
> +      llts(ZEBRA_LLT_EETHER,                "Experimental Ethernet");
> +      llts(ZEBRA_LLT_AX25,                  "AX.25 Level 2");
> +      llts(ZEBRA_LLT_PRONET,                "PROnet token ring");
> +      llts(ZEBRA_LLT_IEEE802,               "IEEE 802.2 Ethernet/TR/TB");
> +      llts(ZEBRA_LLT_ARCNET,                "ARCnet");
> +      llts(ZEBRA_LLT_APPLETLK,              "AppleTalk");
> +      llts(ZEBRA_LLT_DLCI,                  "Frame Relay DLCI");
> +      llts(ZEBRA_LLT_ATM,                   "ATM");
> +      llts(ZEBRA_LLT_METRICOM,              "Metricom STRIP");
> +      llts(ZEBRA_LLT_EUI64,                 "EUI-64");
> +      llts(ZEBRA_LLT_SLIP,                  "SLIP");
> +      llts(ZEBRA_LLT_CSLIP,                 "Compressed SLIP");
> +      llts(ZEBRA_LLT_SLIP6,                 "SLIPv6");
> +      llts(ZEBRA_LLT_CSLIP6,                "Compressed SLIPv6");
> +      llts(ZEBRA_LLT_ROSE,                  "ROSE packet radio");
> +      llts(ZEBRA_LLT_X25,                   "CCITT X.25");
> +      llts(ZEBRA_LLT_CHDLC,                 "Cisco HDLC");
> +      llts(ZEBRA_LLT_RAWHDLC,               "Raw HDLC");
> +      llts(ZEBRA_LLT_LAPB,                  "LAPB");
> +      llts(ZEBRA_LLT_FRAD,                  "FRAD");
> +      llts(ZEBRA_LLT_SKIP,                  "SKIP vif");
> +      llts(ZEBRA_LLT_LOCALTLK,              "Localtalk");
> +      llts(ZEBRA_LLT_FDDI,                  "FDDI");
> +      llts(ZEBRA_LLT_IPDDP,                 "IP-in-DDP tunnel");
> +      llts(ZEBRA_LLT_HIPPI,                 "HiPPI");
> +      llts(ZEBRA_LLT_IRDA,                  "IrDA");
> +      llts(ZEBRA_LLT_FCPP,                  "Fibre-Channel PtP");
> +      llts(ZEBRA_LLT_FCAL,                  "Fibre-Channel Arbitrated Loop");
> +      llts(ZEBRA_LLT_FCPL,                  "Fibre-Channel Public Loop");
> +      llts(ZEBRA_LLT_FCFABRIC,              "Fibre-Channel Fabric");
> +      llts(ZEBRA_LLT_IEEE802_TR,            "IEEE 802.2 Token Ring");
> +      llts(ZEBRA_LLT_IEEE80211_RADIOTAP,    "IEEE 802.11 Radiotap");
> +      llts(ZEBRA_LLT_IEEE802154_PHY,        "IEEE 802.15.4 Phy");


-David

_______________________________________________
Quagga-dev mailing list
Quagga-dev@lists.quagga.net
https://lists.quagga.net/mailman/listinfo/quagga-dev

Reply via email to