37 #if (!XBEE_WIFI_ENABLED) && (!XBEE_CELLULAR_ENABLED) 38 #error "At least one of XBEE_WIFI_ENABLED and XBEE_CELLULAR_ENABLED " \ 39 "must be defined as non-zero to use this header." 45 #define XBEE_FRAME_TRANSMIT_IPV4 0x20 48 #define XBEE_FRAME_RECEIVE_IPV4 0xB0 55 #define XBEE_IPV4_PROTOCOL_UDP 0 56 #define XBEE_IPV4_PROTOCOL_TCP 1 57 #define XBEE_IPV4_PROTOCOL_SSL 4 64 #define XBEE_IPV4_TX_OPT_NONE 0 65 #define XBEE_IPV4_TX_OPT_TCP_CLOSE (1<<1) 68 #define XBEE_IPV4_MAX_PAYLOAD 1500 uint8_t protocol
protocol for message
Definition: ipv4.h:113
unsigned long uint32_t
32-bit unsigned integer
Definition: platform_config.h:43
int xbee_ipv4_receive_dump(xbee_dev_t *xbee, const void FAR *raw, uint16_t length, void FAR *context)
Dump received IPv4 frame to stdout.
Definition: xbee_ipv4.c:166
uint16_t length
number of bytes in payload
Definition: ipv4.h:118
#define FAR
On platforms with "far" pointers, define to the proper keyword; empty definition if not required...
Definition: platform.h:396
uint32_t remote_addr_be
remote device's IP address
Definition: ipv4.h:110
void xbee_ipv4_envelope_dump(const xbee_ipv4_envelope_t FAR *envelope, bool_t include_payload)
Print the contents of an IPv4 envelope to stdout.
Definition: xbee_ipv4.c:143
#define XBEE_BEGIN_DECLS
Macro defined to.
Definition: platform.h:41
int xbee_ipv4_ntoa(char buffer[16], uint32_t ip_be)
Format a big-endian IP address from an XBee frame as a "dotted quad", four decimal numbers separated ...
Definition: xbee_ipv4.c:26
const void FAR * payload
contents of message
Definition: ipv4.h:117
int xbee_ipv4_envelope_send(const xbee_ipv4_envelope_t FAR *envelope)
Send an IPv4 packet.
Definition: xbee_ipv4.c:96
unsigned short uint16_t
16-bit unsigned integer
Definition: platform_config.h:41
unsigned char uint8_t
8-bit unsigned integer
Definition: platform_config.h:39
int xbee_ipv4_envelope_reply(xbee_ipv4_envelope_t FAR *reply, const xbee_ipv4_envelope_t FAR *original)
Address a reply envelope using fields from a received envelope.
Definition: xbee_ipv4.c:82
Format of XBee API frame type 0xB0 (XBEE_FRAME_RECEIVE_IPV4); received from XBee by host...
Definition: ipv4.h:93
xbee_dev_t * xbee
interface received on/to send to
Definition: ipv4.h:109
#define XBEE_END_DECLS
Macro defined to.
Definition: platform.h:42
int xbee_ipv4_aton(const char *cp, uint32_t *ip_be)
Takes an address separated by '.
Definition: xbee_ipv4.c:36
uint16_t remote_port
port on remote device
Definition: ipv4.h:112
uint16_t local_port
port on this device
Definition: ipv4.h:111
int bool_t
Variable that can hold 0 or 1, may be an int for speed purporses or uint8_t for size optimization...
Definition: platform_config.h:51
char * xbee_ipv4_protocol_str(char buffer[8], uint8_t protocol)
A string description of the "protocol" byte from an XBee IPv4 frame.
Definition: xbee_ipv4.c:61