diff options
author | Tom Gundersen <teg@jklm.no> | 2015-10-05 23:16:43 +0200 |
---|---|---|
committer | Tom Gundersen <teg@jklm.no> | 2015-10-05 23:16:43 +0200 |
commit | e78a29abfeb7468e885f8497df1a09265ab7c747 (patch) | |
tree | 2a4a0b7d37d90e462048c2d543e6c1714889a150 /src/libsystemd-network/lldp-network.c | |
parent | dc545f8331333476ba3b08c677e44b565ad1c738 (diff) | |
parent | 6fd255cfaa1ab8a54c9b56781af34661cbfb212a (diff) |
Merge pull request #1448 from bengal/lldp-export-v5
LLDP: add API to export neighbors list (v5)
Diffstat (limited to 'src/libsystemd-network/lldp-network.c')
-rw-r--r-- | src/libsystemd-network/lldp-network.c | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/src/libsystemd-network/lldp-network.c b/src/libsystemd-network/lldp-network.c index 664d2f7867..12a6599ff1 100644 --- a/src/libsystemd-network/lldp-network.c +++ b/src/libsystemd-network/lldp-network.c @@ -82,30 +82,3 @@ int lldp_network_bind_raw_socket(int ifindex) { return r; } - -int lldp_receive_packet(sd_event_source *s, int fd, uint32_t revents, void *userdata) { - _cleanup_tlv_packet_free_ tlv_packet *packet = NULL; - tlv_packet *p; - uint16_t length; - int r; - - assert(fd); - assert(userdata); - - r = tlv_packet_new(&packet); - if (r < 0) - return r; - - length = read(fd, &packet->pdu, sizeof(packet->pdu)); - - /* Silently drop the packet */ - if ((size_t) length > ETHER_MAX_LEN) - return 0; - - packet->userdata = userdata; - - p = packet; - packet = NULL; - - return lldp_handle_packet(p, (uint16_t) length); -} |