Soletta™ Framework
|
#include <arpa/inet.h>
#include <errno.h>
#include <fcntl.h>
#include <netinet/in.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/ioctl.h>
#include <sys/socket.h>
#include "sol-log.h"
#include "sol-mainloop.h"
#include "sol-network.h"
#include "sol-str-slice.h"
#include "sol-vector.h"
#include "sol-coap.h"
Macros | |
#define | DEFAULT_UDP_PORT 5683 |
Functions | |
static void | disable_observing (struct sol_coap_packet *req, struct sol_coap_server *server, struct sol_str_slice path[], const struct sol_network_link_addr *cliaddr) |
int | main (int argc, char *argv[]) |
static bool | reply_cb (void *data, struct sol_coap_server *server, struct sol_coap_packet *req, const struct sol_network_link_addr *cliaddr) |
#define DEFAULT_UDP_PORT 5683 |
Referenced by main().
|
static |
References sol_str_slice::data, sol_coap_add_option(), sol_coap_header_set_code(), sol_coap_header_set_type(), SOL_COAP_MESSAGE_TYPE_CON, SOL_COAP_METHOD_GET, SOL_COAP_OPTION_OBSERVE, SOL_COAP_OPTION_URI_PATH, sol_coap_packet_new(), sol_coap_packet_unref(), sol_coap_send_packet(), SOL_INF, and SOL_INT_CHECK_GOTO.
Referenced by reply_cb().
int main | ( | int | argc, |
char * | argv[] | ||
) |
References sol_str_slice::data, DEFAULT_UDP_PORT, sol_network_link_addr::family, sol_network_link_addr::port, reply_cb(), server, sol_coap_add_option(), sol_coap_header_set_token(), SOL_COAP_MESSAGE_TYPE_CON, SOL_COAP_METHOD_GET, SOL_COAP_OPTION_OBSERVE, SOL_COAP_OPTION_URI_PATH, sol_coap_packet_new_request(), sol_coap_send_packet_with_reply(), sol_coap_server_new(), sol_coap_server_unref(), sol_init(), SOL_NETWORK_FAMILY_INET6, sol_network_link_addr_from_str(), sol_run(), sol_str_slice_from_str(), and SOL_WRN.
|
static |
References sol_str_slice::data, disable_observing(), sol_buffer_at(), SOL_BUFFER_DECLARE_STATIC, sol_buffer_get_slice(), sol_coap_packet_get_payload(), SOL_INF, SOL_NETWORK_INET_ADDR_STR_LEN, sol_network_link_addr_to_str(), SOL_STR_SLICE_PRINT, and sol_buffer::used.
Referenced by main().