]> git.ipfire.org Git - thirdparty/lldpd.git/blob - src/lldpd-structs.h
lldp: don't use chassis TTL anymore
[thirdparty/lldpd.git] / src / lldpd-structs.h
1 /* -*- mode: c; c-file-style: "openbsd" -*- */
2 /*
3 * Copyright (c) 2008 Vincent Bernat <bernat@luffy.cx>
4 *
5 * Permission to use, copy, modify, and/or distribute this software for any
6 * purpose with or without fee is hereby granted, provided that the above
7 * copyright notice and this permission notice appear in all copies.
8 *
9 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16 */
17
18 #ifndef _LLDPD_STRUCTS_H
19 #define _LLDPD_STRUCTS_H
20
21 #if HAVE_CONFIG_H
22 # include <config.h>
23 #endif
24
25 #include <sys/types.h>
26 #include <sys/socket.h>
27
28 /* This is not very convenient, but we need net/if.h for IFNAMSIZ and others but
29 * we may also need linux/if.h in some modules. And they conflict each others.
30 */
31 #ifdef HOST_OS_LINUX
32 # include <linux/if.h>
33 #else
34 # include <net/if.h>
35 #endif
36
37 #include <netinet/in.h>
38 #include <netinet/if_ether.h>
39 #include <sys/queue.h>
40
41 #include "compat/compat.h"
42 #include "marshal.h"
43 #include "lldp-const.h"
44
45 #ifdef ENABLE_DOT1
46 struct lldpd_ppvid {
47 TAILQ_ENTRY(lldpd_ppvid) p_entries;
48 u_int8_t p_cap_status;
49 u_int16_t p_ppvid;
50 };
51 MARSHAL_BEGIN(lldpd_ppvid)
52 MARSHAL_TQE(lldpd_ppvid, p_entries)
53 MARSHAL_END(lldpd_ppvid);
54
55 struct lldpd_vlan {
56 TAILQ_ENTRY(lldpd_vlan) v_entries;
57 char *v_name;
58 u_int16_t v_vid;
59 };
60 MARSHAL_BEGIN(lldpd_vlan)
61 MARSHAL_TQE(lldpd_vlan, v_entries)
62 MARSHAL_STR(lldpd_vlan, v_name)
63 MARSHAL_END(lldpd_vlan);
64
65 struct lldpd_pi {
66 TAILQ_ENTRY(lldpd_pi) p_entries;
67 char *p_pi;
68 int p_pi_len;
69 };
70 MARSHAL_BEGIN(lldpd_pi)
71 MARSHAL_TQE(lldpd_pi, p_entries)
72 MARSHAL_FSTR(lldpd_pi, p_pi, p_pi_len)
73 MARSHAL_END(lldpd_pi);
74 #endif
75
76 #ifdef ENABLE_LLDPMED
77 struct lldpd_med_policy {
78 u_int8_t index; /* Not used. */
79 u_int8_t type;
80 u_int8_t unknown;
81 u_int8_t tagged;
82 u_int16_t vid;
83 u_int8_t priority;
84 u_int8_t dscp;
85 };
86 MARSHAL(lldpd_med_policy);
87
88 struct lldpd_med_loc {
89 u_int8_t index; /* Not used. */
90 u_int8_t format;
91 char *data;
92 int data_len;
93 };
94 MARSHAL_BEGIN(lldpd_med_loc)
95 MARSHAL_FSTR(lldpd_med_loc, data, data_len)
96 MARSHAL_END(lldpd_med_loc);
97
98 struct lldpd_med_power {
99 u_int8_t devicetype; /* PD or PSE */
100 u_int8_t source;
101 u_int8_t priority;
102 u_int16_t val;
103 };
104 MARSHAL(lldpd_med_power);
105 #endif
106
107 #ifdef ENABLE_DOT3
108 struct lldpd_dot3_macphy {
109 u_int8_t autoneg_support;
110 u_int8_t autoneg_enabled;
111 u_int16_t autoneg_advertised;
112 u_int16_t mau_type;
113 };
114
115 struct lldpd_dot3_power {
116 u_int8_t devicetype;
117 u_int8_t supported;
118 u_int8_t enabled;
119 u_int8_t paircontrol;
120 u_int8_t pairs;
121 u_int8_t class;
122 u_int8_t powertype; /* If set to LLDP_DOT3_POWER_8023AT_OFF,
123 following fields have no meaning */
124 u_int8_t source;
125 u_int8_t priority;
126 u_int16_t requested;
127 u_int16_t allocated;
128 };
129 MARSHAL(lldpd_dot3_power);
130 #endif
131
132 enum {
133 LLDPD_AF_UNSPEC = 0,
134 LLDPD_AF_IPV4,
135 LLDPD_AF_IPV6,
136 LLDPD_AF_LAST
137 };
138
139 inline static int
140 lldpd_af(int af)
141 {
142 switch (af) {
143 case LLDPD_AF_IPV4: return AF_INET;
144 case LLDPD_AF_IPV6: return AF_INET6;
145 case LLDPD_AF_LAST: return AF_MAX;
146 default: return AF_UNSPEC;
147 }
148 }
149
150 #define LLDPD_MGMT_MAXADDRSIZE 16 /* sizeof(struct in6_addr) */
151 union lldpd_address {
152 struct in_addr inet;
153 struct in6_addr inet6;
154 u_int8_t octets[LLDPD_MGMT_MAXADDRSIZE]; /* network byte order! */
155 };
156 struct lldpd_mgmt {
157 TAILQ_ENTRY(lldpd_mgmt) m_entries;
158 int m_family;
159 union lldpd_address m_addr;
160 size_t m_addrsize;
161 u_int32_t m_iface;
162 };
163 MARSHAL_BEGIN(lldpd_mgmt)
164 MARSHAL_TQE(lldpd_mgmt, m_entries)
165 MARSHAL_END(lldpd_mgmt);
166
167 struct lldpd_chassis {
168 TAILQ_ENTRY(lldpd_chassis) c_entries;
169 u_int16_t c_refcount; /* Reference count by ports */
170 u_int16_t c_index; /* Monotonic index */
171 u_int8_t c_protocol; /* Protocol used to get this chassis */
172 u_int8_t c_id_subtype;
173 char *c_id;
174 int c_id_len;
175 char *c_name;
176 char *c_descr;
177
178 u_int16_t c_cap_available;
179 u_int16_t c_cap_enabled;
180
181 TAILQ_HEAD(, lldpd_mgmt) c_mgmt;
182
183 #ifdef ENABLE_LLDPMED
184 u_int16_t c_med_cap_available;
185 u_int8_t c_med_type;
186 char *c_med_hw;
187 char *c_med_fw;
188 char *c_med_sw;
189 char *c_med_sn;
190 char *c_med_manuf;
191 char *c_med_model;
192 char *c_med_asset;
193 #endif
194
195 };
196 /* WARNING: any change to this structure should also be reflected into
197 `lldpd_copy_chassis()` which is not using marshaling. */
198 MARSHAL_BEGIN(lldpd_chassis)
199 MARSHAL_IGNORE(lldpd_chassis, c_entries.tqe_next)
200 MARSHAL_IGNORE(lldpd_chassis, c_entries.tqe_prev)
201 MARSHAL_FSTR(lldpd_chassis, c_id, c_id_len)
202 MARSHAL_STR(lldpd_chassis, c_name)
203 MARSHAL_STR(lldpd_chassis, c_descr)
204 MARSHAL_SUBTQ(lldpd_chassis, lldpd_mgmt, c_mgmt)
205 #ifdef ENABLE_LLDPMED
206 MARSHAL_STR(lldpd_chassis, c_med_hw)
207 MARSHAL_STR(lldpd_chassis, c_med_fw)
208 MARSHAL_STR(lldpd_chassis, c_med_sw)
209 MARSHAL_STR(lldpd_chassis, c_med_sn)
210 MARSHAL_STR(lldpd_chassis, c_med_manuf)
211 MARSHAL_STR(lldpd_chassis, c_med_model)
212 MARSHAL_STR(lldpd_chassis, c_med_asset)
213 #endif
214 MARSHAL_END(lldpd_chassis);
215
216 #ifdef ENABLE_CUSTOM
217
218 #define CUSTOM_TLV_ADD 1
219 #define CUSTOM_TLV_REPLACE 2
220 #define CUSTOM_TLV_REMOVE 3
221
222 /* Custom TLV struct as defined on page 35 of IEEE 802.1AB-2005 */
223 struct lldpd_custom {
224 TAILQ_ENTRY(lldpd_custom) next; /* Pointer to next custom TLV */
225
226 /* Organizationally Unique Identifier */
227 u_int8_t oui[LLDP_TLV_ORG_OUI_LEN];
228 /* Organizationally Defined Subtype */
229 u_int8_t subtype;
230 /* Organizationally Defined Information String */
231 u_int8_t *oui_info;
232 /* Organizationally Defined Information String length */
233 int oui_info_len;
234 };
235 MARSHAL_BEGIN(lldpd_custom)
236 MARSHAL_TQE(lldpd_custom, next)
237 MARSHAL_FSTR(lldpd_custom, oui_info, oui_info_len)
238 MARSHAL_END(lldpd_custom);
239 #endif
240
241 struct lldpd_port {
242 TAILQ_ENTRY(lldpd_port) p_entries;
243 struct lldpd_chassis *p_chassis; /* Attached chassis */
244 time_t p_lastchange; /* Time of last change of values */
245 time_t p_lastupdate; /* Time of last update received */
246 struct lldpd_frame *p_lastframe; /* Frame received during last update */
247 u_int8_t p_protocol; /* Protocol used to get this port */
248 u_int8_t p_hidden_in:1; /* Considered as hidden for reception */
249 u_int8_t p_hidden_out:2; /* Considered as hidden for emission */
250 u_int8_t p_disable_rx:3; /* Should RX be disabled for this port? */
251 u_int8_t p_disable_tx:4; /* Should TX be disabled for this port? */
252 /* Important: all fields that should be ignored to check if a port has
253 * been changed should be before this mark. */
254 #define LLDPD_PORT_START_MARKER (offsetof(struct lldpd_port, _p_hardware_flags))
255 int _p_hardware_flags; /* This is a copy of hardware flags. Do not use it! */
256 u_int8_t p_id_subtype;
257 char *p_id;
258 int p_id_len;
259 char *p_descr;
260 int p_descr_force; /* Description has been forced by user */
261 u_int16_t p_mfs;
262 u_int16_t p_ttl; /* TTL for remote port */
263
264 #ifdef ENABLE_DOT3
265 /* Dot3 stuff */
266 u_int32_t p_aggregid;
267 struct lldpd_dot3_macphy p_macphy;
268 struct lldpd_dot3_power p_power;
269 #endif
270
271 #ifdef ENABLE_LLDPMED
272 u_int16_t p_med_cap_enabled;
273 struct lldpd_med_policy p_med_policy[LLDP_MED_APPTYPE_LAST];
274 struct lldpd_med_loc p_med_location[LLDP_MED_LOCFORMAT_LAST];
275 struct lldpd_med_power p_med_power;
276 #endif
277
278 #ifdef ENABLE_DOT1
279 u_int16_t p_pvid;
280 TAILQ_HEAD(, lldpd_vlan) p_vlans;
281 TAILQ_HEAD(, lldpd_ppvid) p_ppvids;
282 TAILQ_HEAD(, lldpd_pi) p_pids;
283 #endif
284 #ifdef ENABLE_CUSTOM
285 TAILQ_HEAD(, lldpd_custom) p_custom_list;
286 #endif
287 };
288 MARSHAL_BEGIN(lldpd_port)
289 MARSHAL_TQE(lldpd_port, p_entries)
290 MARSHAL_POINTER(lldpd_port, lldpd_chassis, p_chassis)
291 MARSHAL_IGNORE(lldpd_port, p_lastframe)
292 MARSHAL_FSTR(lldpd_port, p_id, p_id_len)
293 MARSHAL_STR(lldpd_port, p_descr)
294 #ifdef ENABLE_LLDPMED
295 MARSHAL_SUBSTRUCT(lldpd_port, lldpd_med_loc, p_med_location[0])
296 MARSHAL_SUBSTRUCT(lldpd_port, lldpd_med_loc, p_med_location[1])
297 MARSHAL_SUBSTRUCT(lldpd_port, lldpd_med_loc, p_med_location[2])
298 #endif
299 #ifdef ENABLE_DOT1
300 MARSHAL_SUBTQ(lldpd_port, lldpd_vlan, p_vlans)
301 MARSHAL_SUBTQ(lldpd_port, lldpd_ppvid, p_ppvids)
302 MARSHAL_SUBTQ(lldpd_port, lldpd_pi, p_pids)
303 #endif
304 #ifdef ENABLE_CUSTOM
305 MARSHAL_SUBTQ(lldpd_port, lldpd_custom, p_custom_list)
306 #endif
307 MARSHAL_END(lldpd_port);
308
309 /* Used to modify some port related settings */
310 #define LLDPD_RXTX_UNCHANGED 0
311 #define LLDPD_RXTX_TXONLY 1
312 #define LLDPD_RXTX_RXONLY 2
313 #define LLDPD_RXTX_DISABLED 3
314 #define LLDPD_RXTX_BOTH 4
315 #define LLDPD_RXTX_FROM_PORT(p) (((p)->p_disable_rx && (p)->p_disable_tx)?LLDPD_RXTX_DISABLED: \
316 ((p)->p_disable_rx && !(p)->p_disable_tx)?LLDPD_RXTX_TXONLY: \
317 (!(p)->p_disable_rx && (p)->p_disable_tx)?LLDPD_RXTX_RXONLY: \
318 LLDPD_RXTX_BOTH)
319 #define LLDPD_RXTX_RXENABLED(v) ((v) == LLDPD_RXTX_RXONLY || (v) == LLDPD_RXTX_BOTH)
320 #define LLDPD_RXTX_TXENABLED(v) ((v) == LLDPD_RXTX_TXONLY || (v) == LLDPD_RXTX_BOTH)
321 struct lldpd_port_set {
322 char *ifname;
323 char *local_id;
324 char *local_descr;
325 int rxtx;
326 #ifdef ENABLE_LLDPMED
327 struct lldpd_med_policy *med_policy;
328 struct lldpd_med_loc *med_location;
329 struct lldpd_med_power *med_power;
330 #endif
331 #ifdef ENABLE_DOT3
332 struct lldpd_dot3_power *dot3_power;
333 #endif
334 #ifdef ENABLE_CUSTOM
335 struct lldpd_custom *custom;
336 int custom_list_clear;
337 int custom_tlv_op;
338 #endif
339 };
340 MARSHAL_BEGIN(lldpd_port_set)
341 MARSHAL_STR(lldpd_port_set, ifname)
342 MARSHAL_STR(lldpd_port_set, local_id)
343 MARSHAL_STR(lldpd_port_set, local_descr)
344 #ifdef ENABLE_LLDPMED
345 MARSHAL_POINTER(lldpd_port_set, lldpd_med_policy, med_policy)
346 MARSHAL_POINTER(lldpd_port_set, lldpd_med_loc, med_location)
347 MARSHAL_POINTER(lldpd_port_set, lldpd_med_power, med_power)
348 #endif
349 #ifdef ENABLE_DOT3
350 MARSHAL_POINTER(lldpd_port_set, lldpd_dot3_power, dot3_power)
351 #endif
352 #ifdef ENABLE_CUSTOM
353 MARSHAL_POINTER(lldpd_port_set, lldpd_custom, custom)
354 #endif
355 MARSHAL_END(lldpd_port_set);
356
357 /* Smart mode / Hide mode */
358 #define SMART_INCOMING_FILTER (1<<0) /* Incoming filtering enabled */
359 #define SMART_INCOMING_ONE_PROTO (1<<1) /* On reception, keep only one proto */
360 #define SMART_INCOMING_ONE_NEIGH (1<<2) /* On reception, keep only one neighbor */
361 #define SMART_OUTGOING_FILTER (1<<3) /* Outgoing filtering enabled */
362 #define SMART_OUTGOING_ONE_PROTO (1<<4) /* On emission, keep only one proto */
363 #define SMART_OUTGOING_ONE_NEIGH (1<<5) /* On emission, consider only one neighbor */
364 #define SMART_INCOMING (SMART_INCOMING_FILTER | \
365 SMART_INCOMING_ONE_PROTO | \
366 SMART_INCOMING_ONE_NEIGH)
367 #define SMART_OUTGOING (SMART_OUTGOING_FILTER | \
368 SMART_OUTGOING_ONE_PROTO | \
369 SMART_OUTGOING_ONE_NEIGH)
370
371 struct lldpd_config {
372 int c_paused; /* lldpd is paused */
373 int c_tx_interval; /* Transmit interval */
374 int c_ttl; /* TTL */
375 int c_smart; /* Bitmask for smart configuration (see SMART_*) */
376 int c_receiveonly; /* Receive only mode */
377 int c_max_neighbors; /* Maximum number of neighbors (per protocol) */
378
379 char *c_mgmt_pattern; /* Pattern to match a management address */
380 char *c_cid_pattern; /* Pattern to match interfaces to use for chassis ID */
381 char *c_iface_pattern; /* Pattern to match interfaces to use */
382
383 char *c_platform; /* Override platform description (for CDP) */
384 char *c_description; /* Override chassis description */
385 char *c_hostname; /* Override system name */
386 int c_advertise_version; /* Should the precise version be advertised? */
387 int c_set_ifdescr; /* Set interface description */
388 int c_promisc; /* Interfaces should be in promiscuous mode */
389 int c_cap_advertise; /* Chassis capabilities advertisement */
390 int c_mgmt_advertise; /* Management addresses advertisement */
391
392 #ifdef ENABLE_LLDPMED
393 int c_noinventory; /* Don't send inventory with LLDP-MED */
394 int c_enable_fast_start; /* enable fast start */
395 int c_tx_fast_init; /* Num of lldpd lldppdu's for fast start */
396 int c_tx_fast_interval; /* Time intr between sends during fast start */
397 #endif
398 int c_tx_hold; /* Transmit hold */
399 int c_bond_slave_src_mac_type; /* Src mac type in lldp frames over bond
400 slaves */
401 int c_lldp_portid_type; /* The PortID type */
402 int c_lldp_agent_type; /* The agent type */
403 };
404 MARSHAL_BEGIN(lldpd_config)
405 MARSHAL_STR(lldpd_config, c_mgmt_pattern)
406 MARSHAL_STR(lldpd_config, c_cid_pattern)
407 MARSHAL_STR(lldpd_config, c_iface_pattern)
408 MARSHAL_STR(lldpd_config, c_hostname)
409 MARSHAL_STR(lldpd_config, c_platform)
410 MARSHAL_STR(lldpd_config, c_description)
411 MARSHAL_END(lldpd_config);
412
413 struct lldpd_frame {
414 int size;
415 unsigned char frame[1];
416 };
417
418 struct lldpd_hardware;
419 struct lldpd;
420 struct lldpd_ops {
421 int(*send)(struct lldpd *,
422 struct lldpd_hardware*,
423 char *, size_t); /* Function to send a frame */
424 int(*recv)(struct lldpd *,
425 struct lldpd_hardware*,
426 int, char *, size_t); /* Function to receive a frame */
427 int(*cleanup)(struct lldpd *, struct lldpd_hardware *); /* Cleanup function. */
428 };
429
430 /* An interface is uniquely identified by h_ifindex, h_ifname and h_ops. This
431 * means if an interface becomes enslaved, it will be considered as a new
432 * interface. The same applies for renaming and we include the index in case of
433 * renaming to an existing interface. */
434 struct lldpd_hardware {
435 TAILQ_ENTRY(lldpd_hardware) h_entries;
436
437 struct lldpd *h_cfg; /* Pointer to main configuration */
438 void *h_recv; /* FD for reception */
439 int h_sendfd; /* FD for sending, only used by h_ops */
440 int h_mangle; /* 1 if we have to mangle the MAC address */
441 struct lldpd_ops *h_ops; /* Hardware-dependent functions */
442 void *h_data; /* Hardware-dependent data */
443 void *h_timer; /* Timer for this port */
444
445 int h_mtu;
446 int h_flags; /* Packets will be sent only
447 if IFF_RUNNING. Will be
448 removed if this is left
449 to 0. */
450 int h_ifindex; /* Interface index, used by SNMP */
451 char h_ifname[IFNAMSIZ]; /* Should be unique */
452 u_int8_t h_lladdr[ETHER_ADDR_LEN];
453
454 u_int64_t h_tx_cnt;
455 u_int64_t h_rx_cnt;
456 u_int64_t h_rx_discarded_cnt;
457 u_int64_t h_rx_unrecognized_cnt;
458 u_int64_t h_ageout_cnt;
459 u_int64_t h_insert_cnt;
460 u_int64_t h_delete_cnt;
461 u_int64_t h_drop_cnt;
462
463 /* Previous values of different stuff. */
464 /* Backup of the previous local port. Used to check if there was a
465 * change to send an immediate update. All those are not marshalled to
466 * the client. */
467 void *h_lport_previous;
468 ssize_t h_lport_previous_len;
469 /* Backup of the previous chassis ID. Used to check if there was a
470 * change and send an LLDP shutdown. */
471 u_int8_t h_lchassis_previous_id_subtype;
472 char *h_lchassis_previous_id;
473 int h_lchassis_previous_id_len;
474 /* Backup of the previous port ID. Used to check if there was a change
475 * and send an LLDP shutdown. */
476 u_int8_t h_lport_previous_id_subtype;
477 char *h_lport_previous_id;
478 int h_lport_previous_id_len;
479
480 struct lldpd_port h_lport; /* Port attached to this hardware port */
481 TAILQ_HEAD(, lldpd_port) h_rports; /* Remote ports */
482
483 #ifdef ENABLE_LLDPMED
484 int h_tx_fast; /* current tx fast start count */
485 #endif
486 };
487 MARSHAL_BEGIN(lldpd_hardware)
488 MARSHAL_IGNORE(lldpd_hardware, h_entries.tqe_next)
489 MARSHAL_IGNORE(lldpd_hardware, h_entries.tqe_prev)
490 MARSHAL_IGNORE(lldpd_hardware, h_ops)
491 MARSHAL_IGNORE(lldpd_hardware, h_data)
492 MARSHAL_IGNORE(lldpd_hardware, h_cfg)
493 MARSHAL_IGNORE(lldpd_hardware, h_lport_previous)
494 MARSHAL_IGNORE(lldpd_hardware, h_lport_previous_len)
495 MARSHAL_IGNORE(lldpd_hardware, h_lchassis_previous_id_subtype)
496 MARSHAL_IGNORE(lldpd_hardware, h_lchassis_previous_id)
497 MARSHAL_IGNORE(lldpd_hardware, h_lchassis_previous_id_len)
498 MARSHAL_IGNORE(lldpd_hardware, h_lport_previous_id_subtype)
499 MARSHAL_IGNORE(lldpd_hardware, h_lport_previous_id)
500 MARSHAL_IGNORE(lldpd_hardware, h_lport_previous_id_len)
501 MARSHAL_SUBSTRUCT(lldpd_hardware, lldpd_port, h_lport)
502 MARSHAL_SUBTQ(lldpd_hardware, lldpd_port, h_rports)
503 MARSHAL_END(lldpd_hardware);
504
505 struct lldpd_interface {
506 TAILQ_ENTRY(lldpd_interface) next;
507 char *name;
508 };
509 MARSHAL_BEGIN(lldpd_interface)
510 MARSHAL_TQE(lldpd_interface, next)
511 MARSHAL_STR(lldpd_interface, name)
512 MARSHAL_END(lldpd_interface);
513 TAILQ_HEAD(lldpd_interface_list, lldpd_interface);
514 MARSHAL_TQ(lldpd_interface_list, lldpd_interface);
515
516 struct lldpd_neighbor_change {
517 char *ifname;
518 #define NEIGHBOR_CHANGE_DELETED -1
519 #define NEIGHBOR_CHANGE_ADDED 1
520 #define NEIGHBOR_CHANGE_UPDATED 0
521 int state;
522 struct lldpd_port *neighbor;
523 };
524 MARSHAL_BEGIN(lldpd_neighbor_change)
525 MARSHAL_STR(lldpd_neighbor_change, ifname)
526 MARSHAL_POINTER(lldpd_neighbor_change, lldpd_port, neighbor)
527 MARSHAL_END(lldpd_neighbor_change);
528
529 /* Cleanup functions */
530 void lldpd_chassis_mgmt_cleanup(struct lldpd_chassis *);
531 void lldpd_chassis_cleanup(struct lldpd_chassis *, int);
532 void lldpd_remote_cleanup(struct lldpd_hardware *,
533 void(*expire)(struct lldpd_hardware *, struct lldpd_port *),
534 int);
535 void lldpd_port_cleanup(struct lldpd_port *, int);
536 void lldpd_config_cleanup(struct lldpd_config *);
537 #ifdef ENABLE_DOT1
538 void lldpd_ppvid_cleanup(struct lldpd_port *);
539 void lldpd_vlan_cleanup(struct lldpd_port *);
540 void lldpd_pi_cleanup(struct lldpd_port *);
541 #endif
542 #ifdef ENABLE_CUSTOM
543 void lldpd_custom_tlv_cleanup(struct lldpd_port *, struct lldpd_custom *);
544 void lldpd_custom_tlv_add(struct lldpd_port *, struct lldpd_custom *);
545 void lldpd_custom_list_cleanup(struct lldpd_port *);
546 #endif
547
548 #endif