ad1ad5c8e36ea795034fcdac660b15d7c141d55bSusant Sahani This file is part of systemd.
ad1ad5c8e36ea795034fcdac660b15d7c141d55bSusant Sahani Copyright (C) 2014 Tom Gundersen
ad1ad5c8e36ea795034fcdac660b15d7c141d55bSusant Sahani Copyright (C) 2014 Susant Sahani
ad1ad5c8e36ea795034fcdac660b15d7c141d55bSusant Sahani systemd is free software; you can redistribute it and/or modify it
ad1ad5c8e36ea795034fcdac660b15d7c141d55bSusant Sahani under the terms of the GNU Lesser General Public License as published by
ad1ad5c8e36ea795034fcdac660b15d7c141d55bSusant Sahani the Free Software Foundation; either version 2.1 of the License, or
ad1ad5c8e36ea795034fcdac660b15d7c141d55bSusant Sahani (at your option) any later version.
ad1ad5c8e36ea795034fcdac660b15d7c141d55bSusant Sahani systemd is distributed in the hope that it will be useful, but
ad1ad5c8e36ea795034fcdac660b15d7c141d55bSusant Sahani WITHOUT ANY WARRANTY; without even the implied warranty of
ad1ad5c8e36ea795034fcdac660b15d7c141d55bSusant Sahani MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
ad1ad5c8e36ea795034fcdac660b15d7c141d55bSusant Sahani Lesser General Public License for more details.
ad1ad5c8e36ea795034fcdac660b15d7c141d55bSusant Sahani You should have received a copy of the GNU Lesser General Public License
ad1ad5c8e36ea795034fcdac660b15d7c141d55bSusant Sahani along with systemd; If not, see <http://www.gnu.org/licenses/>.
ad1ad5c8e36ea795034fcdac660b15d7c141d55bSusant Sahanitypedef struct lldp_neighbour_port lldp_neighbour_port;
ad1ad5c8e36ea795034fcdac660b15d7c141d55bSusant Sahanitypedef struct lldp_chassis_id lldp_chassis_id;
6b3fd9a14d378a35d95ec4be65065708d092bee2Torstein Husebøtypedef struct lldp_agent_statistics lldp_agent_statistics;
ad1ad5c8e36ea795034fcdac660b15d7c141d55bSusant Sahaniint lldp_neighbour_port_new(lldp_chassis *c, tlv_packet *tlv, lldp_neighbour_port **ret);
ad1ad5c8e36ea795034fcdac660b15d7c141d55bSusant Sahanivoid lldp_neighbour_port_free(lldp_neighbour_port *p);
ad1ad5c8e36ea795034fcdac660b15d7c141d55bSusant Sahanivoid lldp_neighbour_port_remove_and_free(lldp_neighbour_port *p);
ad1ad5c8e36ea795034fcdac660b15d7c141d55bSusant SahaniDEFINE_TRIVIAL_CLEANUP_FUNC(lldp_neighbour_port *, lldp_neighbour_port_free);
ad1ad5c8e36ea795034fcdac660b15d7c141d55bSusant Sahani#define _cleanup_lldp_neighbour_port_free_ _cleanup_(lldp_neighbour_port_freep)
ad1ad5c8e36ea795034fcdac660b15d7c141d55bSusant SahaniDEFINE_TRIVIAL_CLEANUP_FUNC(lldp_chassis *, lldp_chassis_free);
ad1ad5c8e36ea795034fcdac660b15d7c141d55bSusant Sahani#define _cleanup_lldp_chassis_free_ _cleanup_(lldp_chassis_freep)
ad1ad5c8e36ea795034fcdac660b15d7c141d55bSusant Sahaniint lldp_mib_update_objects(lldp_chassis *c, tlv_packet *tlv);
ad1ad5c8e36ea795034fcdac660b15d7c141d55bSusant Sahaniint lldp_mib_add_objects(Prioq *by_expiry, Hashmap *neighbour_mib, tlv_packet *tlv);
ad1ad5c8e36ea795034fcdac660b15d7c141d55bSusant Sahaniint lldp_mib_remove_objects(lldp_chassis *c, tlv_packet *tlv);
7a6f1457462840ed52f2a332e2bd56ca210cff2dTom Gundersenint lldp_handle_packet(tlv_packet *m, uint16_t length);
0037c2dc54ca5bc5a3ec428619ff136066467565Beniamino Galvaniint lldp_receive_packet(sd_event_source *s, int fd, uint32_t revents, void *userdata);
ad1ad5c8e36ea795034fcdac660b15d7c141d55bSusant Sahani#define log_lldp(fmt, ...) log_internal(LOG_DEBUG, 0, __FILE__, __LINE__, __func__, "LLDP: " fmt, ##__VA_ARGS__)