CoRE resource directory.
More...
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
#include <stdio.h>
#include <ctype.h>
#include <sys/select.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <netdb.h>
#include <sys/stat.h>
#include <dirent.h>
#include <errno.h>
#include <signal.h>
#include "config.h"
#include "utlist.h"
#include "resource.h"
#include "coap.h"
Go to the source code of this file.
|
rd_t * | rd_new () |
|
void | rd_delete (rd_t *rd) |
|
void | handle_sigint (int signum) |
|
void | hnd_get_resource (coap_context_t *ctx, struct coap_resource_t *resource, coap_address_t *peer, coap_pdu_t *request, str *token, coap_pdu_t *response) |
|
void | hnd_put_resource (coap_context_t *ctx, struct coap_resource_t *resource, coap_address_t *peer, coap_pdu_t *request, str *token, coap_pdu_t *response) |
|
void | hnd_delete_resource (coap_context_t *ctx, struct coap_resource_t *resource, coap_address_t *peer, coap_pdu_t *request, str *token, coap_pdu_t *response) |
|
void | hnd_get_rd (coap_context_t *ctx, struct coap_resource_t *resource, coap_address_t *peer, coap_pdu_t *request, str *token, coap_pdu_t *response) |
|
int | parse_param (unsigned char *search, size_t search_len, unsigned char *data, size_t data_len, str *result) |
|
void | add_source_address (struct coap_resource_t *resource, coap_address_t *peer) |
|
rd_t * | make_rd (coap_address_t *peer, coap_pdu_t *pdu) |
|
void | hnd_post_rd (coap_context_t *ctx, struct coap_resource_t *resource, coap_address_t *peer, coap_pdu_t *request, str *token, coap_pdu_t *response) |
|
void | init_resources (coap_context_t *ctx) |
|
void | usage (const char *program, const char *version) |
|
coap_context_t * | get_context (const char *node, const char *port) |
|
int | join (coap_context_t *ctx, char *group_name) |
|
int | main (int argc, char **argv) |
|
#define COAP_RESOURCE_CHECK_TIME 2 |
Definition at line 39 of file rd.c.
#define min |
( |
|
a, |
|
|
|
b |
|
) |
| ((a) < (b) ? (a) : (b)) |
Definition at line 45 of file rd.c.
Definition at line 42 of file rd.c.
#define RD_ROOT_STR ((unsigned char *)"rd") |
Definition at line 41 of file rd.c.
void add_source_address |
( |
struct coap_resource_t * |
resource, |
|
|
coap_address_t * |
peer |
|
) |
| |
Definition at line 260 of file rd.c.
Definition at line 517 of file rd.c.
void handle_sigint |
( |
int |
signum | ) |
|
Definition at line 83 of file rd.c.
Definition at line 183 of file rd.c.
Definition at line 201 of file rd.c.
Definition at line 88 of file rd.c.
Definition at line 349 of file rd.c.
Definition at line 109 of file rd.c.
Definition at line 484 of file rd.c.
Definition at line 559 of file rd.c.
int main |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
Definition at line 617 of file rd.c.
Definition at line 316 of file rd.c.
int parse_param |
( |
unsigned char * |
search, |
|
|
size_t |
search_len, |
|
|
unsigned char * |
data, |
|
|
size_t |
data_len, |
|
|
str * |
result |
|
) |
| |
Definition at line 216 of file rd.c.
void rd_delete |
( |
rd_t * |
rd | ) |
|
|
inline |
Definition at line 71 of file rd.c.
Definition at line 61 of file rd.c.
void usage |
( |
const char * |
program, |
|
|
const char * |
version |
|
) |
| |
Definition at line 500 of file rd.c.
Definition at line 79 of file rd.c.
Definition at line 58 of file rd.c.