summaryrefslogtreecommitdiff
path: root/src/network/networkd-lldp-tx.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2016-04-11 18:07:04 +0200
committerLennart Poettering <lennart@poettering.net>2016-04-12 13:43:33 +0200
commit50724a7afcaea472d9143a169c51318abf5f69ef (patch)
tree62d0a705e75738f6750bf72f14b80bf8b8d4922b /src/network/networkd-lldp-tx.c
parent8e20adcaa0cf06a85d36e2fda35fa1d70d5d63c8 (diff)
sd-lldp: drop LLDP ethernet export from sd-lldp.h
We only use it for the Tx code anyway, hence sd-lldp.h shouldn't expose it, as it only implements Rx.
Diffstat (limited to 'src/network/networkd-lldp-tx.c')
-rw-r--r--src/network/networkd-lldp-tx.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/network/networkd-lldp-tx.c b/src/network/networkd-lldp-tx.c
index c940e63052..6bde04bc32 100644
--- a/src/network/networkd-lldp-tx.c
+++ b/src/network/networkd-lldp-tx.c
@@ -30,6 +30,8 @@
#include "string-util.h"
#include "unaligned.h"
+#define LLDP_MULTICAST_ADDR { 0x01, 0x80, 0xc2, 0x00, 0x00, 0x0e }
+
/* The LLDP spec calls this "txFastInit", see 9.2.5.19 */
#define LLDP_TX_FAST_INIT 4U
@@ -127,7 +129,7 @@ static int lldp_make_packet(
h = (struct ether_header*) packet;
h->ether_type = htobe16(ETHERTYPE_LLDP);
- memcpy(h->ether_dhost, &(struct ether_addr) { SD_LLDP_MULTICAST_ADDR }, ETH_ALEN);
+ memcpy(h->ether_dhost, &(struct ether_addr) { LLDP_MULTICAST_ADDR }, ETH_ALEN);
memcpy(h->ether_shost, hwaddr, ETH_ALEN);
p = (uint8_t*) packet + sizeof(struct ether_header);
@@ -199,7 +201,7 @@ static int lldp_send_packet(int ifindex, const void *packet, size_t packet_size)
.ll.sll_protocol = htobe16(ETHERTYPE_LLDP),
.ll.sll_ifindex = ifindex,
.ll.sll_halen = ETH_ALEN,
- .ll.sll_addr = SD_LLDP_MULTICAST_ADDR,
+ .ll.sll_addr = LLDP_MULTICAST_ADDR,
};
_cleanup_close_ int fd = -1;