The Assimilation Project
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
cdp.h
Go to the documentation of this file.
1 
25 #include <projectcommon.h>
26 #include <glib.h>
33 #define CDP_TLV_DEVID 0x0001
34 #define CDP_TLV_ADDRESS 0x0002
36 #define CDP_TLV_PORTID 0x0003
37 #define CDP_TLV_CAPS 0x0004
39 #define CDP_TLV_VERS 0x0005
40 #define CDP_TLV_PLATFORM 0x0006
41 #define CDP_TLV_IPPREFIX 0x0007
42 #define CDP_TLV_HELLO 0x0008
43 #define CDP_TLV_VTPDOMAIN 0x0009
44 #define CDP_TLV_NATIVEVLAN 0x000A
45 #define CDP_TLV_DUPLEX 0x000B
46 #define CDP_TLV_APPLID 0x000E
47 #define CDP_TLV_POWER 0x0010
48 
50 
59 #define CDP_CAPMASK_ROUTER 0x01
60 #define CDP_CAPMASK_TBBRIDGE 0x02
61 #define CDP_CAPMASK_SPBRIDGE 0x04
62 #define CDP_CAPMASK_SWITCH 0x08
63 #define CDP_CAPMASK_HOST 0x10
64 #define CDP_CAPMASK_IGMPFILTER 0x20
65 #define CDP_CAPMASK_REPEATER 0x40
66 
68 WINEXPORT guint8 get_cdp_vers(gconstpointer pktptr, gconstpointer pktend);
69 WINEXPORT guint8 get_cdp_ttl(gconstpointer pktptr, gconstpointer pktend);
70 WINEXPORT guint16 get_cdp_cksum(gconstpointer pktptr, gconstpointer pktend);
71 WINEXPORT guint16 get_cdptlv_type(gconstpointer tlv_vp, gconstpointer pktend);
72 WINEXPORT gsize get_cdptlv_len(gconstpointer tlv_vp, gconstpointer pktend);
73 WINEXPORT gsize get_cdptlv_vlen(gconstpointer tlv_vp, gconstpointer pktend);
74 WINEXPORT gconstpointer get_cdptlv_body(gconstpointer tlv_vp, gconstpointer pktend);
75 WINEXPORT gconstpointer get_cdptlv_first(gconstpointer pkt, gconstpointer pktend);
76 WINEXPORT gconstpointer get_cdptlv_next(gconstpointer tlv_vp, gconstpointer pktend);
77 WINEXPORT gconstpointer get_cdp_chassis_id(gconstpointer packet, gssize* idlength, gconstpointer pktend);
78 WINEXPORT gconstpointer get_cdp_port_id(gconstpointer packet, gssize* idlength, gconstpointer pktend);
79 WINEXPORT gboolean is_valid_cdp_packet(gconstpointer packet, gconstpointer pktend);
80 WINEXPORT gboolean enable_cdp_packets(gboolean enableme);
WINEXPORT gboolean is_valid_cdp_packet(gconstpointer packet, gconstpointer pktend)
WINEXPORT gconstpointer get_cdptlv_next(gconstpointer tlv_vp, gconstpointer pktend)
#define WINEXPORT
Definition: projectcommon.h:45
WINEXPORT guint16 get_cdp_cksum(gconstpointer pktptr, gconstpointer pktend)
WINEXPORT gboolean enable_cdp_packets(gboolean enableme)
WINEXPORT gconstpointer get_cdptlv_first(gconstpointer pkt, gconstpointer pktend)
WINEXPORT gconstpointer get_cdp_chassis_id(gconstpointer packet, gssize *idlength, gconstpointer pktend)
Get the chassis ID associated with this CDP packet.
Definition: cdp_min.c:261
WINEXPORT guint8 get_cdp_vers(gconstpointer pktptr, gconstpointer pktend)
Project common header file.
WINEXPORT gsize get_cdptlv_vlen(gconstpointer tlv_vp, gconstpointer pktend)
WINEXPORT gconstpointer get_cdp_port_id(gconstpointer packet, gssize *idlength, gconstpointer pktend)
get the port ID associated with this CDP packet
Definition: cdp_min.c:282
WINEXPORT gconstpointer get_cdptlv_body(gconstpointer tlv_vp, gconstpointer pktend)
WINEXPORT gsize get_cdptlv_len(gconstpointer tlv_vp, gconstpointer pktend)
WINEXPORT guint8 get_cdp_ttl(gconstpointer pktptr, gconstpointer pktend)
WINEXPORT guint16 get_cdptlv_type(gconstpointer tlv_vp, gconstpointer pktend)