Go to the source code of this file.
Functions | |
p_packet * | p_pkt_alloc (void) |
Create a new packet. | |
p_packet * | p_pkt_dup (const struct p_packet *packet) |
Duplicate a new packet. | |
int | p_pkt_free (struct p_packet *packet) |
Destroy a packet. | |
int | p_pkt_parse (struct p_packet *packet, const char *data, size_t len) |
Transforming a buffer into a packet. | |
const uint8_t * | p_pkt_get_location (const struct p_packet *packet) |
Get location from a packet. | |
const uint8_t * | p_pkt_get_srcid (const struct p_packet *packet) |
Gets the source-ID stored in a CL-packet. | |
uint8_t | p_pkt_get_seq (const struct p_packet *packet) |
Get seq-# from a packet. | |
int | p_pkt_get_ack (const struct p_packet *packet) |
Get acknowledge-state from a packet. | |
size_t | p_pkt_get_payload_length (struct p_packet *packet) |
Get the total length of payload from a packet. | |
char * | p_pkt_get_location_str (const struct p_packet *packet, char *buffer, size_t maxlen) |
Get location-ID from a packet as string. | |
char * | p_pkt_get_srcid_str (const struct p_packet *packet, char *buffer, size_t maxlen) |
Get source-ID from a packet as string. | |
int | p_pkt_set_location (struct p_packet *packet, const uint8_t *location) |
Sets the location-ID of a CL-packet. | |
int | p_pkt_set_srcid (struct p_packet *packet, const uint8_t *source) |
Sets the source-ID of a CL-packet. | |
int | p_pkt_set_seq (struct p_packet *packet, const uint8_t seq) |
Sets the sequence-number of a CL-packet. | |
int | p_pkt_set_location_str (struct p_packet *packet, const char *location) |
Sets the location-ID of a CL-packet with a string. | |
int | p_pkt_set_srcid_str (struct p_packet *packet, const char *source) |
Sets the source-ID of a CL-packet with a string. | |
void | p_describe_pkt (const struct p_packet *packet) |
Prints out all information about a packet. | |
char * | p_pkt_get_payload (const struct p_packet *pkt, char *buf, size_t *len) |
Get the ACL-payload of pkt. | |
int | p_pkt_set_payload (struct p_packet *pkt, const char *data, size_t len) |
Set the ACL-payload of pkt. | |
p_acl_tuple * | p_acl_first (const struct p_packet *packet) |
Find the first ACL-tuple in a packet. | |
p_acl_tuple * | p_acl_next (const struct p_packet *packet, const struct p_acl_tuple *acl_tuple) |
Find the next ACL-tuple in a packet. | |
int | p_acl_findfirst (const struct p_packet *packet, const uint8_t *acl_type, struct p_acl_tuple **found_tuple) |
Find the first ACL-tuple in a packet by type. | |
int | p_acl_findfirst_str (const struct p_packet *packet, const char *acl_type, struct p_acl_tuple **found_tuple) |
Find the first ACL-tuple in a packet by type, ACL-type as string. | |
int | p_acl_findnext (const struct p_packet *packet, struct p_acl_tuple *current_tuple, struct p_acl_tuple **found_tuple) |
Find the next ACL-tuple in a packet by type. | |
int | p_acl_add_tuple (struct p_packet *pkt, struct p_acl_tuple *acl, int may_frag) |
Adds an existing ACL-tuple to a CL-packet. | |
int | p_acl_add (struct p_packet *pkt, const uint8_t *type, const uint8_t *data, size_t len, int may_frag) |
Adds a new ACL-tuple to a CL-packet. | |
int | p_acl_add_str (struct p_packet *pkt, const char *type_str, const uint8_t *data, size_t len, int may_frag) |
Adds a ACL-tuple to a CL-packet, ACL-type as string. | |
p_acl_tuple * | p_acl_new (const uint8_t *type, const uint8_t *data, size_t len) |
Creates a new ACL-tuple. | |
p_acl_tuple * | p_acl_new_str (const char *type_str, const uint8_t *data, size_t len) |
Creates a new ACL-tuple, ACL-type as string. | |
ssize_t | p_acl_get_data (const struct p_acl_tuple *acl, uint8_t **data) |
Get the data, which is stored in an ACL-tuple. | |
ssize_t | p_acl_get_len (const struct p_acl_tuple *acl) |
return the length of the data array in the acl tuple | |
const uint8_t * | p_acl_get_type (const struct p_acl_tuple *acl) |
Get the ACL-Type of an ACL-tuple. | |
char * | p_acl_get_type_str (const struct p_acl_tuple *acl, char *buf) |
Get the ACL-Type of an ACL-tuple as a string. | |
p_acl_tuple * | p_acl_dup (const struct p_acl_tuple *acl) |
duplicate a acl tuple. | |
uint8_t | p_acl_cmp (const struct p_acl_tuple *first, const struct p_acl_tuple *second) |
compare two acl tuple for equality. |
Definition in file packet.h.