#include <net/if.h>
#ifndef _WIN32
#include <netinet/in.h>
-#include <netinet/if_ether.h>
#endif
#include <sys/socket.h>
#include <sys/types.h>
u_int16_t c_index; /* Monotonic index */
u_int8_t c_protocol; /* Protocol used to get this chassis */
u_int8_t c_id_subtype;
- char *c_id;
+ uint8_t *c_id; /* Typically an Ethernet address. */
int c_id_len;
char *c_name;
char *c_descr;
u_int16_t c_ttl;
- struct lldpd_mgmt c_mgmt;
+ struct ovs_list c_mgmt; /* Contains "struct lldp_mgmt"s. */
};
/* WARNING: any change to this structure should also be reflected into
`lldpd_copy_chassis()` which is not using marshaling. */
struct lldpd_frame *p_lastframe; /* Frame received during last update */
u_int8_t p_protocol; /* Protocol used to get this port */
u_int8_t p_hidden_in:1; /* Considered hidden for reception */
- u_int8_t p_hidden_out:2; /* Considered hidden for emission */
+ u_int8_t p_hidden_out:1; /* Considered hidden for emission */
/* Important: all fields that should be ignored to check if a port has
* been changed should be before p_id_subtype. Check
* `lldpd_reset_timer()`.
struct ovs_list p_isid_vlan_maps; /* Contains "struct lldpd_aa_isid_vlan_maps_tlv"s. */
};
-/* Used to modify some port related settings */
-struct lldpd_port_set {
- char *ifname;
-};
-
/* Smart mode / Hide mode */
#define SMART_INCOMING_FILTER (1<<0) /* Incoming filtering enabled */
#define SMART_INCOMING_ONE_PROTO (1<<1) /* On reception, keep only 1 proto */
struct lldpd_hardware;
struct lldpd;
struct lldpd_ops {
- int(*send)(struct lldpd *,
- struct lldpd_hardware*,
- char *, size_t); /* Function to send a frame */
- int(*recv)(struct lldpd *,
- struct lldpd_hardware*,
- int, char *, size_t); /* Function to receive a frame */
- int(*cleanup)(struct lldpd *, struct lldpd_hardware *); /* Cleanup */
+ int (*send)(struct lldpd *,
+ struct lldpd_hardware *,
+ char *, size_t); /* Function to send a frame */
+ int (*recv)(struct lldpd *,
+ struct lldpd_hardware *,
+ int, char *, size_t); /* Function to receive a frame */
+ int (*cleanup)(struct lldpd *, struct lldpd_hardware *); /* Cleanup */
};
/* An interface is uniquely identified by h_ifindex, h_ifname and h_ops. This
* is a change
*/
struct lldpd_port h_lport; /* Port attached to this hardware port */
- struct lldpd_port h_rports; /* Remote ports */
+ struct ovs_list h_rports; /* Contains "struct lldp_port"s. */
};
struct lldpd_interface;