This graph shows which files directly or indirectly include this file:
Go to the source code of this file.
Wireless trace support | |
Functions to access wireless information from packets that have wireless monitoring headers such as Radiotap or Prism. The trace_get_wireless_* functions provide an abstract interface for retrieving information from wireless traces. They take a pointer to the wireless monitoring header (usually found with trace_get_link(packet)) and the linktype of the header passed in.
All of the trace_get_wireless_* functions return false if the requested information was unavailable, or true if it was. The actual data is stored in an output variable supplied by the caller. Values returned into the output variable will always be returned in host byte order. | |
#define | ARPHRD_80211_RADIOTAP 803 |
DLLEXPORT bool | trace_get_wireless_tsft (void *linkptr, libtrace_linktype_t linktype, uint64_t *tsft) |
Get the wireless Timer Syncronisation Function. | |
DLLEXPORT bool | trace_get_wireless_rate (void *linkptr, libtrace_linktype_t linktype, uint8_t *rate) |
Get the wireless rate. | |
DLLEXPORT bool | trace_get_wireless_freq (void *linkptr, libtrace_linktype_t linktype, uint16_t *freq) |
Get the wireless channel frequency. | |
DLLEXPORT bool | trace_get_wireless_signal_strength_dbm (void *linkptr, libtrace_linktype_t linktype, int8_t *strength) |
Get the wireless signal strength in dBm. | |
DLLEXPORT bool | trace_get_wireless_noise_strength_dbm (void *linkptr, libtrace_linktype_t linktype, int8_t *strength) |
Get the wireless noise strength in dBm. | |
DLLEXPORT bool | trace_get_wireless_signal_strength_db (void *linkptr, libtrace_linktype_t linktype, uint8_t *strength) |
Get the wireless signal strength in dB. | |
DLLEXPORT bool | trace_get_wireless_noise_strength_db (void *linkptr, libtrace_linktype_t linktype, uint8_t *strength) |
Get the wireless noise strength in dB. | |
DLLEXPORT bool | trace_get_wireless_tx_attenuation (void *linkptr, libtrace_linktype_t linktype, uint16_t *attenuation) |
Get the wireless transmit attenuation. | |
DLLEXPORT bool | trace_get_wireless_tx_attenuation_db (void *linkptr, libtrace_linktype_t linktype, uint16_t *attenuation) |
Get the wireless transmit attenuation in dB. | |
DLLEXPORT bool | trace_get_wireless_tx_power_dbm (void *linkptr, libtrace_linktype_t linktype, int8_t *txpower) |
Get the wireless transmit power in dBm. | |
DLLEXPORT bool | trace_get_wireless_antenna (void *linkptr, libtrace_linktype_t linktype, uint8_t *antenna) |
Get the wireless antenna. | |
DLLEXPORT bool | trace_get_wireless_fcs (void *linkptr, libtrace_linktype_t linktype, uint32_t *fcs) |
Get the wireless Frame Check Sequence field. | |
Protocol structures | |
These convenience structures are here as they are portable ways of dealing with various protocols. | |
typedef libtrace_ip | libtrace_ip_t |
Generic IP header structure. | |
typedef libtrace_ip6_ext | libtrace_ip6_ext_t |
IPv6 header extension structure. | |
typedef libtrace_ip6 | libtrace_ip6_t |
Generic IPv6 header structure. | |
typedef libtrace_tcp | libtrace_tcp_t |
Generic TCP header structure. | |
typedef libtrace_udp | libtrace_udp_t |
Generic UDP header structure. | |
typedef libtrace_icmp | libtrace_icmp_t |
Generic ICMP header structure. | |
typedef libtrace_llcsnap | libtrace_llcsnap_t |
Generic LLC/SNAP header structure. | |
typedef libtrace_ether | libtrace_ether_t |
802.3 frame | |
typedef libtrace_8021q | libtrace_8021q_t |
802.1Q frame | |
typedef libtrace_atm_cell | libtrace_atm_cell_t |
ATM User Network Interface (UNI) Cell. | |
typedef libtrace_atm_nni_cell | libtrace_atm_nni_cell_t |
ATM Network Node/Network Interface (NNI) Cell. | |
typedef libtrace_atm_capture_cell | libtrace_atm_capture_cell_t |
Captured UNI cell. | |
typedef libtrace_atm_nni_capture_cell | libtrace_atm_nni_capture_cell_t |
Captured NNI cell. | |
typedef libtrace_pos | libtrace_pos_t |
POS header. | |
typedef libtrace_80211_t | libtrace_80211_t |
802.11 header | |
typedef libtrace_radiotap_t | libtrace_radiotap_t |
The Radiotap header pre-amble. | |
Reading/Writing packets | |
These members deal with creating, reading and writing packets | |
typedef libtrace_eventobj_t | libtrace_eventobj_t |
Structure returned by libtrace_event explaining what the current event is. | |
enum | libtrace_event_t { TRACE_EVENT_IOWAIT, TRACE_EVENT_SLEEP, TRACE_EVENT_PACKET, TRACE_EVENT_TERMINATE } |
Event types see libtrace_eventobj_t and trace_event. More... | |
DLLEXPORT libtrace_packet_t * | trace_create_packet (void) |
Create a new packet object. | |
DLLEXPORT libtrace_packet_t * | trace_copy_packet (const libtrace_packet_t *packet) |
Copy a packet. | |
DLLEXPORT void | trace_destroy_packet (libtrace_packet_t *packet) |
Destroy a packet object. | |
DLLEXPORT int | trace_read_packet (libtrace_t *trace, libtrace_packet_t *packet) |
Read one packet from the trace. | |
DLLEXPORT libtrace_eventobj_t | trace_event (libtrace_t *trace, libtrace_packet_t *packet) |
Processes the next libtrace event. | |
DLLEXPORT int | trace_write_packet (libtrace_out_t *trace, libtrace_packet_t *packet) |
Write one packet out to the output trace. | |
Trace management | |
These members deal with creating, configuring, starting, pausing and cleaning up a trace object | |
enum | trace_option_t { TRACE_OPTION_SNAPLEN, TRACE_OPTION_PROMISC, TRACE_OPTION_FILTER, TRACE_META_FREQ } |
Valid trace capture options. More... | |
enum | trace_option_output_t { TRACE_OPTION_OUTPUT_FILEFLAGS, TRACE_OPTION_OUTPUT_COMPRESS } |
DLLEXPORT libtrace_t * | trace_create (const char *uri) |
Create a trace file from a URI. | |
DLLEXPORT libtrace_t * | trace_create_dead (const char *uri) |
Creates a "dummy" trace file that has only the format type set. | |
DLLEXPORT libtrace_out_t * | trace_create_output (const char *uri) |
Creates a trace output file from a URI. | |
DLLEXPORT int | trace_start (libtrace_t *libtrace) |
Start the capture. | |
DLLEXPORT int | trace_pause (libtrace_t *libtrace) |
Pause the capture. | |
DLLEXPORT int | trace_start_output (libtrace_out_t *libtrace) |
Start an output trace. | |
DLLEXPORT int | trace_config (libtrace_t *libtrace, trace_option_t option, void *value) |
Sets an input config option. | |
DLLEXPORT int | trace_config_output (libtrace_out_t *libtrace, trace_option_output_t option, void *value) |
Sets an output config option. | |
DLLEXPORT void | trace_destroy (libtrace_t *trace) |
Close a trace file, freeing up any resources it may have been using. | |
DLLEXPORT void | trace_destroy_dead (libtrace_t *trace) |
Close a trace file, freeing up any resources it may have been using. | |
DLLEXPORT void | trace_destroy_output (libtrace_out_t *trace) |
Close a trace output file, freeing up any resources it may have been using. | |
DLLEXPORT libtrace_err_t | trace_get_err (libtrace_t *trace) |
Check (and clear) the current error state of an input trace. | |
DLLEXPORT bool | trace_is_err (libtrace_t *trace) |
Return if there is an error. | |
DLLEXPORT void | trace_perror (libtrace_t *trace, const char *msg,...) PRINTF(2 |
Output an error message to stderr and clear the error status. | |
DLLEXPORT void DLLEXPORT libtrace_err_t | trace_get_err_output (libtrace_out_t *trace) |
Check (and clear) the current error state of an output trace. | |
DLLEXPORT bool | trace_is_err_output (libtrace_out_t *trace) |
Return if there is an error. | |
DLLEXPORT void | trace_perror_output (libtrace_out_t *trace, const char *msg,...) PRINTF(2 |
Output an error message to stderr and clear the error status. | |
Protocol decodes | |
These functions locate and return a pointer to various headers inside a packet | |
DLLEXPORT SIMPLE_FUNCTION void * | trace_get_link (const libtrace_packet_t *packet) |
get a pointer to the link layer | |
DLLEXPORT SIMPLE_FUNCTION libtrace_ip_t * | trace_get_ip (libtrace_packet_t *packet) |
get a pointer to the IP header (if any) | |
DLLEXPORT SIMPLE_FUNCTION libtrace_ip6_t * | trace_get_ip6 (libtrace_packet_t *packet) |
get a pointer to the IPv6 header (if any) | |
DLLEXPORT void * | trace_get_transport (libtrace_packet_t *packet, uint8_t *proto, uint32_t *remaining) |
Gets a pointer to the transport layer header (if any). | |
DLLEXPORT void * | trace_get_payload_from_ip (libtrace_ip_t *ip, uint8_t *proto, uint32_t *remaining) |
Gets a pointer to the payload given a pointer to the IP header. | |
DLLEXPORT void * | trace_get_payload_from_ip6 (libtrace_ip6_t *ipptr, uint8_t *prot, uint32_t *remaining) |
Gets a pointer to the payload given a pointer to the IPv6 header. | |
DLLEXPORT void * | trace_get_payload_from_link (void *linkptr, libtrace_linktype_t linktype, uint16_t *type, uint32_t *remaining) |
Gets a pointer to the payload given a pointer to the link header. | |
DLLEXPORT void * | trace_get_vlan_payload_from_ethernet_payload (void *ethernet_payload, uint16_t *type, uint32_t *remaining) |
Skips over any 802.1q headers, if present. | |
DLLEXPORT void * | trace_get_payload_from_tcp (libtrace_tcp_t *tcp, uint32_t *remaining) |
Gets a pointer to the payload given a pointer to a tcp header. | |
DLLEXPORT void * | trace_get_payload_from_udp (libtrace_udp_t *udp, uint32_t *remaining) |
Gets a pointer to the payload given a pointer to a udp header. | |
DLLEXPORT void * | trace_get_payload_from_icmp (libtrace_icmp_t *icmp, uint32_t *remaining) |
Gets a pointer to the payload given a pointer to a icmp header. | |
DLLEXPORT SIMPLE_FUNCTION libtrace_tcp_t * | trace_get_tcp (libtrace_packet_t *packet) |
get a pointer to the TCP header (if any) | |
DLLEXPORT SIMPLE_FUNCTION libtrace_tcp_t * | trace_get_tcp_from_ip (libtrace_ip_t *ip, uint32_t *remaining) |
get a pointer to the TCP header (if any) given a pointer to the IP header | |
DLLEXPORT SIMPLE_FUNCTION libtrace_udp_t * | trace_get_udp (libtrace_packet_t *packet) |
get a pointer to the UDP header (if any) | |
DLLEXPORT SIMPLE_FUNCTION libtrace_udp_t * | trace_get_udp_from_ip (libtrace_ip_t *ip, uint32_t *remaining) |
get a pointer to the UDP header (if any) given a pointer to the IP header | |
DLLEXPORT SIMPLE_FUNCTION libtrace_icmp_t * | trace_get_icmp (libtrace_packet_t *packet) |
get a pointer to the ICMP header (if any) | |
DLLEXPORT SIMPLE_FUNCTION libtrace_icmp_t * | trace_get_icmp_from_ip (libtrace_ip_t *ip, uint32_t *remaining) |
get a pointer to the ICMP header (if any) given a pointer to the IP header | |
DLLEXPORT SIMPLE_FUNCTION uint8_t * | trace_get_destination_mac (libtrace_packet_t *packet) |
Get the destination MAC address. | |
DLLEXPORT SIMPLE_FUNCTION uint8_t * | trace_get_source_mac (libtrace_packet_t *packet) |
Get the source MAC address. | |
DLLEXPORT SIMPLE_FUNCTION struct sockaddr * | trace_get_source_address (const libtrace_packet_t *packet, struct sockaddr *addr) |
Get the source IP address. | |
DLLEXPORT SIMPLE_FUNCTION struct sockaddr * | trace_get_destination_address (const libtrace_packet_t *packet, struct sockaddr *addr) |
Get the destination IP address. | |
Time | |
These functions deal with time that a packet arrived and return it in various formats | |
DLLEXPORT SIMPLE_FUNCTION uint64_t | trace_get_erf_timestamp (const libtrace_packet_t *packet) |
Get the current time in DAG time format. | |
DLLEXPORT SIMPLE_FUNCTION struct timeval | trace_get_timeval (const libtrace_packet_t *packet) |
Get the current time in struct timeval. | |
DLLEXPORT SIMPLE_FUNCTION double | trace_get_seconds (const libtrace_packet_t *packet) |
Get the current time in floating point seconds. | |
DLLEXPORT int | trace_seek_seconds (libtrace_t *trace, double seconds) |
Seek within a trace. | |
DLLEXPORT int | trace_seek_timeval (libtrace_t *trace, struct timeval tv) |
Seek within a trace. | |
DLLEXPORT int | trace_seek_erf_timestamp (libtrace_t *trace, uint64_t ts) |
Seek within a trace. | |
Sizes | |
This section deals with finding or setting the various different lengths a packet can have | |
DLLEXPORT SIMPLE_FUNCTION size_t | trace_get_capture_length (const libtrace_packet_t *packet) |
Get the size of the packet in the trace. | |
DLLEXPORT SIMPLE_FUNCTION size_t | trace_get_wire_length (const libtrace_packet_t *packet) |
Get the size of the packet as it was seen on the wire. | |
DLLEXPORT SIMPLE_FUNCTION size_t | trace_get_framing_length (const libtrace_packet_t *packet) |
Get the length of the capture framing headers. | |
DLLEXPORT size_t | trace_set_capture_length (libtrace_packet_t *packet, size_t size) |
Truncate ("snap") the packet at the suggested length. | |
BPF | |
This section deals with using Berkley Packet Filters | |
DLLEXPORT SIMPLE_FUNCTION libtrace_filter_t * | trace_create_filter (const char *filterstring) |
setup a BPF filter | |
DLLEXPORT int | trace_apply_filter (libtrace_filter_t *filter, const libtrace_packet_t *packet) |
apply a BPF filter | |
DLLEXPORT void | trace_destroy_filter (libtrace_filter_t *filter) |
destory of BPF filter | |
Portability | |
This section has functions that causes annoyances to portability for one reason or another. | |
DLLEXPORT char * | trace_ether_ntoa (const uint8_t *addr, char *buf) |
Convert an ethernet address to a string. | |
DLLEXPORT uint8_t * | trace_ether_aton (const char *buf, uint8_t *addr) |
Convert a string to an ethernet address. | |
Defines | |
#define | DLLEXPORT |
#define | DLLLOCAL |
#define | LT_BITFIELD8 unsigned int |
#define | LT_BITFIELD16 unsigned int |
#define | LT_BITFIELD32 unsigned int |
#define | LT_BITFIELD64 unsigned int |
#define | LIBTRACE_API_VERSION ((3<<16)|(0<<8)|(0)) |
API version as 2 byte hex digits, eg 0xXXYYZZ. | |
#define | SIMPLE_FUNCTION |
#define | UNUSED |
#define | PACKED |
#define | PRINTF(formatpos, argpos) |
#define | LIBTRACE_PACKET_BUFSIZE 65536 |
The size of a packet's buffer when managed by libtrace. | |
Typedefs | |
typedef libtrace_out_t | libtrace_out_t |
Opaque structure holding information about an output trace. | |
typedef libtrace_t | libtrace_t |
Opaque structure holding information about a trace. | |
typedef libtrace_filter_t | libtrace_filter_t |
Opaque structure holding information about a bpf filter. | |
typedef trace_err_t | libtrace_err_t |
libtrace error information | |
typedef libtrace_packet_t | libtrace_packet_t |
The libtrace packet structure, applications shouldn't be meddling around in here. | |
Enumerations | |
enum | buf_control_t { TRACE_CTRL_PACKET = 'p', TRACE_CTRL_EXTERNAL = 'e' } |
If a packet has memory allocated If the packet has allocated it's own memory it's buffer_control should be TRACE_CTRL_PACKET, when the packet is destroyed it's memory will be free()'d. More... | |
enum | { TRACE_ERR_NOERROR = 0, TRACE_ERR_BAD_FORMAT = -1, TRACE_ERR_INIT_FAILED = -2, TRACE_ERR_UNKNOWN_OPTION = -3, TRACE_ERR_NO_CONVERSION = -4, TRACE_ERR_BAD_PACKET = -5, TRACE_ERR_OPTION_UNAVAIL = -6, TRACE_ERR_UNSUPPORTED = -7 } |
Enumeration of error codes. More... | |
enum | libtrace_dlt_t { TRACE_DLT_NULL = 0, TRACE_DLT_EN10MB = 1, TRACE_DLT_ATM_RFC1483 = 11, TRACE_DLT_RAW = 101, TRACE_DLT_IEEE802_11 = 105, TRACE_DLT_LINUX_SLL = 113, TRACE_DLT_PFLOG = 117, TRACE_DLT_IEEE802_11_RADIO = 127 } |
Enumeration of DLT types supported by libtrace These aren't actually DLTs, but LINKTYPE_'s, so becareful when modifying this. More... | |
enum | libtrace_linktype_t { TRACE_TYPE_HDLC_POS = 1, TRACE_TYPE_ETH = 2, TRACE_TYPE_ATM = 3, TRACE_TYPE_80211 = 4, TRACE_TYPE_NONE = 5, TRACE_TYPE_LINUX_SLL = 6, TRACE_TYPE_PFLOG = 7, TRACE_TYPE_POS = 9, TRACE_TYPE_80211_PRISM = 12, TRACE_TYPE_AAL5 = 13, TRACE_TYPE_DUCK = 14, TRACE_TYPE_80211_RADIO = 15, TRACE_TYPE_LLCSNAP = 16 } |
Enumeration of link layer types supported by libtrace. More... | |
enum | base_format_t { TRACE_FORMAT_ERF = 1, TRACE_FORMAT_PCAP = 2, TRACE_FORMAT_PCAPFILE = 3, TRACE_FORMAT_WAG = 4, TRACE_FORMAT_RT = 5, TRACE_FORMAT_LEGACY_ATM = 6, TRACE_FORMAT_LEGACY_POS = 7, TRACE_FORMAT_LEGACY_ETH = 8, TRACE_FORMAT_LINUX_NATIVE = 9, TRACE_FORMAT_DUCK = 10, TRACE_FORMAT_BPF = 11 } |
RT protocol base format identifiers This is used to say what kind of packet is being sent over the rt protocol. More... | |
enum | libtrace_rt_types_t { TRACE_RT_HELLO = 1, TRACE_RT_START = 2, TRACE_RT_ACK = 3, TRACE_RT_STATUS = 4, TRACE_RT_DUCK = 5, TRACE_RT_END_DATA = 6, TRACE_RT_CLOSE = 7, TRACE_RT_DENY_CONN = 8, TRACE_RT_PAUSE = 9, TRACE_RT_PAUSE_ACK = 10, TRACE_RT_OPTION = 11, TRACE_RT_KEYCHANGE = 12, TRACE_RT_DUCK_2_4 = 13, TRACE_RT_DUCK_2_5 = 14, TRACE_RT_LOSTCONN = 15, TRACE_RT_DATA_SIMPLE = 1000, TRACE_RT_DATA_ERF = TRACE_RT_DATA_SIMPLE+TRACE_FORMAT_ERF, TRACE_RT_DATA_WAG = TRACE_RT_DATA_SIMPLE+TRACE_FORMAT_WAG, TRACE_RT_DATA_LEGACY_ATM = TRACE_RT_DATA_SIMPLE+TRACE_FORMAT_LEGACY_ATM, TRACE_RT_DATA_LEGACY_POS = TRACE_RT_DATA_SIMPLE+TRACE_FORMAT_LEGACY_POS, TRACE_RT_DATA_LEGACY_ETH = TRACE_RT_DATA_SIMPLE+TRACE_FORMAT_LEGACY_ETH, TRACE_RT_DATA_LINUX_NATIVE = TRACE_RT_DATA_SIMPLE+TRACE_FORMAT_LINUX_NATIVE, TRACE_RT_DATA_DLT = 2000, TRACE_RT_DLT_NULL = TRACE_RT_DATA_DLT+TRACE_DLT_NULL, TRACE_RT_DLT_EN10MB = TRACE_RT_DATA_DLT+TRACE_DLT_EN10MB, TRACE_RT_DLT_IEEE802_11 = TRACE_RT_DATA_DLT+TRACE_DLT_IEEE802_11, TRACE_RT_DLT_LINUX_SLL = TRACE_RT_DATA_DLT+TRACE_DLT_LINUX_SLL, TRACE_RT_DLT_PFLOG = TRACE_RT_DATA_DLT+TRACE_DLT_PFLOG, TRACE_RT_DLT_ATM_RFC1483 = TRACE_RT_DATA_DLT+TRACE_DLT_ATM_RFC1483, TRACE_RT_LAST = (2<<31) } |
enum | libtrace_direction_t { TRACE_DIR_OUTGOING = 0, TRACE_DIR_INCOMING = 1, TRACE_DIR_OTHER = 2 } |
Trace directions Note that these are the directions used by convention, more directions are possible, not just these 3, and that they may not conform to this convention. More... | |
enum | libtrace_radiotap_field_t { TRACE_RADIOTAP_TSFT = 0, TRACE_RADIOTAP_FLAGS = 1, TRACE_RADIOTAP_RATE = 2, TRACE_RADIOTAP_CHANNEL = 3, TRACE_RADIOTAP_FHSS = 4, TRACE_RADIOTAP_DBM_ANTSIGNAL = 5, TRACE_RADIOTAP_DBM_ANTNOISE = 6, TRACE_RADIOTAP_LOCK_QUALITY = 7, TRACE_RADIOTAP_TX_ATTENUATION = 8, TRACE_RADIOTAP_DB_TX_ATTENUATION = 9, TRACE_RADIOTAP_DBM_TX_POWER = 10, TRACE_RADIOTAP_ANTENNA = 11, TRACE_RADIOTAP_DB_ANTSIGNAL = 12, TRACE_RADIOTAP_DB_ANTNOISE = 13, TRACE_RADIOTAP_FCS = 14, TRACE_RADIOTAP_EXT = 31 } |
Enumeration of Radiotap fields. More... | |
enum | serverport_t { USE_DEST, USE_SOURCE } |
Which port is the server port. More... | |
Functions | |
DLLEXPORT void | trace_help (void) |
Prints help information for libtrace. | |
DLLEXPORT int | trace_get_next_option (unsigned char **ptr, int *len, unsigned char *type, unsigned char *optlen, unsigned char **data) |
parse an ip or tcp option | |
DLLEXPORT SIMPLE_FUNCTION libtrace_linktype_t | trace_get_link_type (const libtrace_packet_t *packet) |
Get the type of the link layer. | |
DLLEXPORT libtrace_direction_t | trace_set_direction (libtrace_packet_t *packet, libtrace_direction_t direction) |
Set the direction flag, if it has one. | |
DLLEXPORT SIMPLE_FUNCTION libtrace_direction_t | trace_get_direction (const libtrace_packet_t *packet) |
Get the direction flag, if it has one. | |
DLLEXPORT SIMPLE_FUNCTION uint16_t | trace_get_source_port (const libtrace_packet_t *packet) |
Get the source port. | |
DLLEXPORT SIMPLE_FUNCTION uint16_t | trace_get_destination_port (const libtrace_packet_t *packet) |
Get the destination port. | |
DLLEXPORT SIMPLE_FUNCTION int8_t | trace_get_server_port (uint8_t protocol, uint16_t source, uint16_t dest) |
hint at the server port in specified protocol | |
DLLEXPORT const char * | trace_parse_uri (const char *uri, char **format) |
Takes a uri and splits it into a format and uridata component. | |
DLLEXPORT enum base_format_t | trace_get_format (struct libtrace_packet_t *packet) |
Gets the format type for a given packet. | |
DLLEXPORT void | trace_construct_packet (libtrace_packet_t *packet, libtrace_linktype_t linktype, const void *data, uint16_t len) |
Construct a packet from a buffer. |
Perry Lorier
|
API version as 2 byte hex digits, eg 0xXXYYZZ.
|
|
The size of a packet's buffer when managed by libtrace.
|
|
802.11 header
|
|
802.1Q frame
|
|
Captured UNI cell. Endance don't capture the HEC, presumably to keep alignment. This version of the libtrace_atm_cell} is used when dealing with dag captures of uni cells. |
|
ATM User Network Interface (UNI) Cell.
|
|
Captured NNI cell. Endance don't capture the HEC, presumably to keep alignment. This version of the libtrace_atm_nni_cell} is used when dealing with dag captures of nni cells. |
|
ATM Network Node/Network Interface (NNI) Cell.
|
|
libtrace error information
|
|
802.3 frame
|
|
Structure returned by libtrace_event explaining what the current event is.
|
|
Opaque structure holding information about a bpf filter.
|
|
Generic ICMP header structure.
|
|
IPv6 header extension structure.
|
|
Generic IPv6 header structure.
|
|
Generic IP header structure.
|
|
Generic LLC/SNAP header structure.
|
|
Opaque structure holding information about an output trace.
|
|
The libtrace packet structure, applications shouldn't be meddling around in here.
|
|
POS header.
|
|
The Radiotap header pre-amble. All Radiotap headers start with this pre-amble, followed by the fields specified in the it_present bitmask. If bit 31 of it_present is set, then another bitmask follows.
|
|
Opaque structure holding information about a trace.
|
|
Generic TCP header structure.
|
|
Generic UDP header structure.
|
|
Enumeration of error codes.
|
|
RT protocol base format identifiers This is used to say what kind of packet is being sent over the rt protocol.
|
|
If a packet has memory allocated If the packet has allocated it's own memory it's buffer_control should be TRACE_CTRL_PACKET, when the packet is destroyed it's memory will be free()'d. If it's doing zerocopy out of memory owned by something else it should be TRACE_CTRL_EXTERNAL.
|
|
Trace directions Note that these are the directions used by convention, more directions are possible, not just these 3, and that they may not conform to this convention.
|
|
Enumeration of DLT types supported by libtrace These aren't actually DLTs, but LINKTYPE_'s, so becareful when modifying this.
|
|
Event types see libtrace_eventobj_t and trace_event.
|
|
|
Enumeration of Radiotap fields.
|
|
|
|
Which port is the server port.
|
|
|
|
Valid trace capture options.
|
|
apply a BPF filter
|
|
Sets an input config option.
|
|
Sets an output config option.
|
|
Construct a packet from a buffer.
|
|
Copy a packet.
|
|
Create a trace file from a URI.
If an error occured when attempting to open the trace file, an error trace is returned and trace_get_error should be called to find out if an error occured, and what that error was. The trace is created in the configuration state, you must call trace_start to start the capture. |
|
Creates a "dummy" trace file that has only the format type set.
|
|
setup a BPF filter
|
|
Creates a trace output file from a URI.
If an error occured when attempting to open the output trace, NULL is returned and trace_errno is set. Use trace_perror() to get more information |
|
Create a new packet object.
|
|
Close a trace file, freeing up any resources it may have been using.
|
|
Close a trace file, freeing up any resources it may have been using.
|
|
destory of BPF filter
|
|
Close a trace output file, freeing up any resources it may have been using.
|
|
Destroy a packet object. sideeffect: sets packet to NULL |
|
Convert a string to an ethernet address.
|
|
Convert an ethernet address to a string.
|
|
Processes the next libtrace event.
|
|
Get the size of the packet in the trace.
|
|
Get the destination IP address.
|
|
Get the destination MAC address.
|
|
Get the destination port.
|
|
Get the direction flag, if it has one.
|
|
Get the current time in DAG time format.
|
|
Check (and clear) the current error state of an input trace.
|
|
Check (and clear) the current error state of an output trace.
|
|
Gets the format type for a given packet.
|
|
Get the length of the capture framing headers.
|
|
get a pointer to the ICMP header (if any)
|
|
get a pointer to the ICMP header (if any) given a pointer to the IP header
|
|
get a pointer to the IP header (if any)
|
|
get a pointer to the IPv6 header (if any)
|
|
get a pointer to the link layer
|
|
Get the type of the link layer.
|
|
parse an ip or tcp option
|
|
Gets a pointer to the payload given a pointer to a icmp header.
|
|
Gets a pointer to the payload given a pointer to the IP header.
proto may be NULL if not needed.
|
|
Gets a pointer to the payload given a pointer to the IPv6 header.
proto may be NULL if not needed. |
|
Gets a pointer to the payload given a pointer to the link header.
type may be NULL if not needed. |
|
Gets a pointer to the payload given a pointer to a tcp header.
|
|
Gets a pointer to the payload given a pointer to a udp header.
|
|
Get the current time in floating point seconds.
|
|
hint at the server port in specified protocol
|
|
Get the source IP address.
|
|
Get the source MAC address.
|
|
Get the source port.
|
|
get a pointer to the TCP header (if any)
|
|
get a pointer to the TCP header (if any) given a pointer to the IP header
|
|
Get the current time in struct timeval.
|
|
Gets a pointer to the transport layer header (if any).
|
|
get a pointer to the UDP header (if any)
|
|
get a pointer to the UDP header (if any) given a pointer to the IP header
|
|
Skips over any 802.1q headers, if present.
Type must point to the value of the ethernet type. Libtrace will assert fail if type is NULL. |
|
Get the size of the packet as it was seen on the wire.
|
|
Get the wireless antenna.
|
|
Get the wireless Frame Check Sequence field.
|
|
Get the wireless channel frequency.
|
|
Get the wireless noise strength in dB.
|
|
Get the wireless noise strength in dBm.
|
|
Get the wireless rate.
|
|
Get the wireless signal strength in dB.
|
|
Get the wireless signal strength in dBm.
|
|
Get the wireless Timer Syncronisation Function. Gets the value of the timer syncronisation function for this frame, which is a value in microseconds indicating the time that the first bit of the MPDU was received by the MAC.
|
|
Get the wireless transmit attenuation.
|
|
Get the wireless transmit attenuation in dB.
|
|
Get the wireless transmit power in dBm.
|
|
Prints help information for libtrace. Function prints out some basic help information regarding libtrace, and then prints out the help() function registered with each input module |
|
Return if there is an error.
|
|
Return if there is an error.
|
|
Takes a uri and splits it into a format and uridata component.
|
|
Pause the capture.
|
|
Output an error message to stderr and clear the error status.
|
|
Output an error message to stderr and clear the error status.
|
|
Read one packet from the trace.
|
|
Seek within a trace.
|
|
Seek within a trace.
|
|
Seek within a trace.
|
|
Truncate ("snap") the packet at the suggested length.
|
|
Set the direction flag, if it has one.
|
|
Start the capture.
|
|
Start an output trace.
|
|
Write one packet out to the output trace.
|