#include <sys/types.h>
#include <cc/ccc_packet.h>
#include <cc/mac.h>
Typedefs | |
typedef void(*) | ccc_packet_handler_t (ccc_packet_t *pkt) |
Functions | |
void | ccc_deregister_packet_handler (u_char type) |
u_short | ccc_get_address (void) |
u_short | ccc_get_mtu (void) |
ccc_packet_handler_t | ccc_get_packet_handler (u_char type) |
int | ccc_init (mac_interface_t *mac_interface) |
int | ccc_register_packet_handler (u_char type, ccc_packet_handler_t handler) |
void | ccc_release (void) |
int | ccc_send (u_short dst, u_char type, ccc_packet_t *pkt) |
void | ccc_test (void) |
ccc_packet_t * | new_ccc_packet (u_short data_length) |
typedef void(*) ccc_packet_handler_t(ccc_packet_t *pkt) |
packet-handler type
void ccc_deregister_packet_handler | ( | u_char | type | ) |
Deregisters the packet handler of the specified type.
type | [in] packet type |
u_short ccc_get_address | ( | void | ) |
Returns the configured mac address.
u_short ccc_get_mtu | ( | void | ) |
Returns the maximal payload size of a ccc packet.
ccc_packet_handler_t ccc_get_packet_handler | ( | u_char | type | ) |
Returns the currently installed packet handler for the specified type.
type | [in] packet type |
int ccc_init | ( | mac_interface_t * | mac_interface | ) |
Initialises the CC1000 communication library.
mac_interface | [in] CC1000 MAC-Interface to use |
int ccc_register_packet_handler | ( | u_char | type, | |
ccc_packet_handler_t | handler | |||
) |
Registers a packet handler for the specified packet type.
type | [in] packet type to handle | |
handler | [in] packet handler to use |
void ccc_release | ( | void | ) |
Releases the CC1000 communication library.
int ccc_send | ( | u_short | dst, | |
u_char | type, | |||
ccc_packet_t * | pkt | |||
) |
Sends a ccc packet to the specified destination node.
dst | [in] destination address | |
type | [in] packet type | |
pkt | [in] packet to send, note that the header will be overwritten |
ccc_packet_t* new_ccc_packet | ( | u_short | data_length | ) |
Allocates memory for a new ccc packet with the given (maximal) payload size.
data_length | [in] maximal length of the payload |