libcoap
4.3.0
|
Representation of network addresses. More...
#include <assert.h>
#include <stdint.h>
#include <string.h>
#include <sys/types.h>
#include "libcoap.h"
Go to the source code of this file.
Data Structures | |
struct | coap_address_t |
multi-purpose address abstraction More... | |
Typedefs | |
typedef struct coap_address_t | coap_address_t |
multi-purpose address abstraction More... | |
Functions | |
uint16_t | coap_address_get_port (const coap_address_t *addr) |
Returns the port from addr in host byte order. More... | |
void | coap_address_set_port (coap_address_t *addr, uint16_t port) |
Set the port field of addr to port (in host byte order). More... | |
int | coap_address_equals (const coap_address_t *a, const coap_address_t *b) |
Compares given address objects a and b . More... | |
COAP_STATIC_INLINE int | _coap_address_isany_impl (const coap_address_t *a) |
void | coap_address_init (coap_address_t *addr) |
Resets the given coap_address_t object addr to its default values. More... | |
COAP_STATIC_INLINE void | coap_address_copy (coap_address_t *dst, const coap_address_t *src) |
COAP_STATIC_INLINE int | coap_address_isany (const coap_address_t *a) |
Checks if given address object a denotes the wildcard address. More... | |
int | coap_is_mcast (const coap_address_t *a) |
Checks if given address a denotes a multicast address. More... | |
Representation of network addresses.
Definition in file address.h.
typedef struct coap_address_t coap_address_t |
multi-purpose address abstraction
COAP_STATIC_INLINE int _coap_address_isany_impl | ( | const coap_address_t * | a | ) |
COAP_STATIC_INLINE void coap_address_copy | ( | coap_address_t * | dst, |
const coap_address_t * | src | ||
) |
int coap_address_equals | ( | const coap_address_t * | a, |
const coap_address_t * | b | ||
) |
uint16_t coap_address_get_port | ( | const coap_address_t * | addr | ) |
void coap_address_init | ( | coap_address_t * | addr | ) |
Resets the given coap_address_t object addr
to its default values.
In particular, the member size must be initialized to the available size for storing addresses.
addr | The coap_address_t object to initialize. |
Definition at line 102 of file address.c.
COAP_STATIC_INLINE int coap_address_isany | ( | const coap_address_t * | a | ) |
void coap_address_set_port | ( | coap_address_t * | addr, |
uint16_t | port | ||
) |
int coap_is_mcast | ( | const coap_address_t * | a | ) |