]> git.puffer.fish Git - mirror/frr.git/commitdiff
isisd: Convert to using prefix.h ETH_ALEN 899/head
authorDonald Sharp <sharpd@cumulusnetworks.com>
Thu, 3 Aug 2017 12:46:00 +0000 (08:46 -0400)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Fri, 4 Aug 2017 13:06:14 +0000 (09:06 -0400)
Remove the #define for ETH_ALEN as well as ETHER_ADDR_LEN
and convert all uses to ETH_ALEN

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
isisd/isis_bpf.c
isisd/isis_circuit.c
isisd/isis_circuit.h
isisd/isis_constants.h

index 69c2f941f072544573e89d74379ad9379f3670a3..98f612f827874b4b74259250c2b1b5d710bbd0e6 100644 (file)
@@ -250,8 +250,8 @@ int isis_recv_pdu_bcast(struct isis_circuit *circuit, u_char *ssnpa)
                     bpf_hdr->bh_caplen - LLC_LEN - ETHER_HDR_LEN);
        stream_set_getp(circuit->rcv_stream, 0);
 
-       memcpy(ssnpa, readbuff + bpf_hdr->bh_hdrlen + ETHER_ADDR_LEN,
-              ETHER_ADDR_LEN);
+       memcpy(ssnpa, readbuff + bpf_hdr->bh_hdrlen + ETH_ALEN,
+              ETH_ALEN);
 
        if (ioctl(circuit->fd, BIOCFLUSH, &one) < 0)
                zlog_warn("Flushing failed: %s", safe_strerror(errno));
@@ -281,10 +281,10 @@ int isis_send_pdu_bcast(struct isis_circuit *circuit, int level)
         */
        eth = (struct ether_header *)sock_buff;
        if (level == 1)
-               memcpy(eth->ether_dhost, ALL_L1_ISS, ETHER_ADDR_LEN);
+               memcpy(eth->ether_dhost, ALL_L1_ISS, ETH_ALEN);
        else
-               memcpy(eth->ether_dhost, ALL_L2_ISS, ETHER_ADDR_LEN);
-       memcpy(eth->ether_shost, circuit->u.bc.snpa, ETHER_ADDR_LEN);
+               memcpy(eth->ether_dhost, ALL_L2_ISS, ETH_ALEN);
+       memcpy(eth->ether_shost, circuit->u.bc.snpa, ETH_ALEN);
        size_t frame_size = stream_get_endp(circuit->snd_stream) + LLC_LEN;
        eth->ether_type = htons(isis_ethertype(frame_size));
 
index c321677dee057e4626b9e36769d5e5298b0677de..9622dcdbc4e480c424a7f20fb231920385cfe35d 100644 (file)
 #include <netinet/if_ether.h>
 #endif
 
-#ifndef ETHER_ADDR_LEN
-#define        ETHER_ADDR_LEN  ETHERADDRL
-#endif
-
 #include "log.h"
 #include "memory.h"
 #include "vrf.h"
index 5e523cd68ba73dbb38c2dd384d19d797ab5f36c1..ad53be46836619ded13fa3b69ee7393f033e4964 100644 (file)
@@ -26,6 +26,7 @@
 #include "vty.h"
 #include "if.h"
 #include "qobj.h"
+#include "prefix.h"
 
 #include "isis_constants.h"
 #include "isis_common.h"
index 4b5ff888bab52b7bfd05d3c3bc05e77f476767df..f3a5a24dde577b0ca62913837b686c71ce99b431 100644 (file)
        ((if_is_broadcast((C)->interface)) ? (C->interface->mtu - LLC_LEN)     \
                                           : (C->interface->mtu))
 
-#ifndef ETH_ALEN
-#define ETH_ALEN 6
-#endif
-
 #define MAX_LLC_LEN 0x5ff
 #define ETHERTYPE_EXT_LLC 0x8870