diff options
author | Beniamino Galvani <bgalvani@redhat.com> | 2015-07-10 18:43:12 +0200 |
---|---|---|
committer | Beniamino Galvani <bgalvani@redhat.com> | 2015-10-02 17:39:12 +0200 |
commit | 176c355b43e616b61552566303ad59d5fd910333 (patch) | |
tree | 9198ba7be4f24b643ef9c24b8e1d01b421fb4b3b /src/systemd | |
parent | 97030a86f0137bca52c3cf9b30e5ed3bdf69b2f2 (diff) | |
download | systemd-176c355b43e616b61552566303ad59d5fd910333.tar.gz |
lldp: export opaque TLV type and accessor functions
Export struct tlv_packet as a public opaque sd_lldp_packet type and
make its accessor functions public.
Diffstat (limited to 'src/systemd')
-rw-r--r-- | src/systemd/sd-lldp.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/systemd/sd-lldp.h b/src/systemd/sd-lldp.h index 0680e526b0..efa76dacf7 100644 --- a/src/systemd/sd-lldp.h +++ b/src/systemd/sd-lldp.h @@ -29,6 +29,7 @@ enum { }; typedef struct sd_lldp sd_lldp; +typedef struct tlv_packet sd_lldp_packet; typedef void (*sd_lldp_cb_t)(sd_lldp *lldp, int event, void *userdata); @@ -43,3 +44,14 @@ int sd_lldp_detach_event(sd_lldp *lldp); int sd_lldp_set_callback(sd_lldp *lldp, sd_lldp_cb_t cb, void *userdata); int sd_lldp_save(sd_lldp *lldp, const char *file); + +int sd_lldp_packet_read_chassis_id(sd_lldp_packet *tlv, uint8_t *type, uint8_t **data, uint16_t *length); +int sd_lldp_packet_read_port_id(sd_lldp_packet *tlv, uint8_t *type, uint8_t **data, uint16_t *length); +int sd_lldp_packet_read_ttl(sd_lldp_packet *tlv, uint16_t *ttl); +int sd_lldp_packet_read_system_name(sd_lldp_packet *tlv, char **data, uint16_t *length); +int sd_lldp_packet_read_system_description(sd_lldp_packet *tlv, char **data, uint16_t *length); +int sd_lldp_packet_read_system_capability(sd_lldp_packet *tlv, uint16_t *data); +int sd_lldp_packet_read_port_description(sd_lldp_packet *tlv, char **data, uint16_t *length); + +sd_lldp_packet *sd_lldp_packet_ref(sd_lldp_packet *tlv); +sd_lldp_packet *sd_lldp_packet_unref(sd_lldp_packet *tlv); |