Files
libcoap/libcoap-2.map
T
Jon Shallow 9083189f95 Proxy: Update Proxy support for Proxy-Uri: CoAP option
Add code to better support the Proxy-Uri: and Proxy-Scheme: CoAP Options.

examples/client.c:

Make sure that the Proxy-Uri: option is added (if set) when clearing down an
observation (fixes #112).
Check that Proxy-Uri: option has a maximum data length of 1034 bytes.
Handle user defined Proxy-Scheme: option correctly.
Update -P option to include scheme to be used when connecting to the proxy.

examples/coap-server.c:

Add in hnd_proxy_uri() handler function. This has support for a direct or ongoing
proxy connection for the coap* protocols. The ongoing connection is set up as a
different CoAP session and is assocated with the incoming session for relaying
requests / responses.

Internal functions taken from client.c are used where appropriate.

Proxy support code has a SERVER_CAN_PROXY wrapper, so footprint can easily be
reduced if required.

New -P and -u options added to support ongoing connections.

include/coap2/net.h:

Add in tracking the proxy uri handler into coap_context_t.

include/coap2/resource.h:

Track whether a resource definition is for Proxy-Uri:/Proxy-Scheme:.
Define the coap_resource_proxy_uri_init() function for handling the Proxy-Uri:
option or Proxy-Scheme: option in an incoming request.

include/coap2/uri.h:

Add in COAP_URI_SCHEME_HTTP and COAP_URI_SCHEME_HTTPS as valid Proxy-Uri:
schemes.
Define the coap_split_proxy_uri() function (similar to coap_split_uri() but
supports the proxy extras.  Both now use a common sub function internally.

libcoap-2.map:
libcoap-2.sym:

Expose the new coap_resource_proxy_uri_init() and coap_split_proxy_uri()
functions.

man/Makefile.am:

Handle coap_resource_get_userdata(3) now being over the 10 definition limit
in man/coap_resource.txt.in.

man/coap-client.txt.in:

Update documentation for the -P option.

man/coap-server.txt.in:

Document the new -P proxy option.
Document the new -u user option.

man/coap_resource.txt.in:

Include documentation for coap_resource_proxy_uri_init().

src/coap_debug.c:

Output the Proxy-Scheme: Option as text.

src/net.c:

Sanity check and handle COAP_OPTION_PROXY_URI and COAP_OPTION_PROXY_SCHEME
in handle_request().

src/resource.c:

Add in coap_resource_proxy_uri_init() function.
Handle the addition of a proxy uri handler in coap_add_resource().

src/uri.c:

Rename coap_split_uri() to coap_split_uri_sub() and add in extra proxy
handling support based on input parameters.

Create new coap_split_uri() and coap_split_proxy_uri() which call
coap_split_uri_sub() appropriately.

TODO:

Remove reference to Proxy support required

src/coap_gnutls.c:

Fix a double deallocate found during testing
2020-11-11 17:46:17 +00:00

226 lines
5.0 KiB
Plaintext

VER_2 {
global:
coap_add_attr;
coap_add_block;
coap_add_data;
coap_add_data_after;
coap_add_data_blocked_response;
coap_add_observer;
coap_add_option;
coap_add_option_later;
coap_add_optlist_pdu;
coap_add_resource;
coap_address_equals;
coap_address_get_port;
coap_address_init;
coap_address_set_port;
coap_add_token;
coap_adjust_basetime;
coap_cache_derive_key;
coap_cache_get_app_data;
coap_cache_get_by_key;
coap_cache_get_by_pdu;
coap_cache_get_pdu;
coap_cache_ignore_options;
coap_cache_set_app_data;
coap_calc_timeout;
coap_cancel_all_messages;
coap_cancel_session_messages;
coap_can_exit;
coap_check_notify;
coap_check_option;
coap_cleanup;
coap_clear_event_handler;
coap_clock_init;
coap_clone_uri;
coap_context_get_coap_fd;
coap_context_set_keepalive;
coap_context_set_pki;
coap_context_set_pki_root_cas;
coap_context_set_psk;
coap_context_set_psk2;
coap_debug_send_packet;
coap_debug_set_packet_loss;
coap_decode_var_bytes;
coap_decode_var_bytes8;
coap_delete_attr;
coap_delete_binary;
coap_delete_bin_const;
coap_delete_cache_entry;
coap_delete_cache_key;
coap_delete_node;
coap_delete_observer;
coap_delete_observers;
coap_delete_optlist;
coap_delete_pdu;
coap_delete_resource;
coap_delete_str_const;
coap_delete_string;
coap_dispatch;
coap_dtls_get_log_level;
coap_dtls_is_supported;
coap_dtls_set_log_level;
coap_encode_var_safe;
coap_encode_var_safe8;
coap_endpoint_get_session;
coap_endpoint_set_default_mtu;
coap_endpoint_str;
coap_find_async;
coap_find_attr;
coap_find_observer;
coap_find_transaction;
coap_fls;
coap_flsll;
coap_free_async;
coap_free_context;
coap_free_endpoint;
coap_free_type;
coap_get_app_data;
coap_get_block;
coap_get_data;
coap_get_log_level;
coap_get_query;
coap_get_resource_from_uri_path;
coap_get_tls_library_version;
coap_get_uri_path;
coap_handle_dgram;
coap_handle_event;
coap_handle_failed_notify;
coap_hash_impl;
coap_insert_node;
coap_insert_optlist;
coap_io_do_epoll;
coap_io_do_io;
coap_io_prepare_epoll;
coap_io_prepare_io;
coap_io_process;
coap_io_process_with_fds;
coap_is_mcast;
coap_join_mcast_group;
coap_log_impl;
coap_make_str_const;
coap_malloc_endpoint;
coap_malloc_type;
coap_memory_init;
coap_network_read;
coap_network_send;
coap_new_binary;
coap_new_bin_const;
coap_new_cache_entry;
coap_new_client_session;
coap_new_client_session_pki;
coap_new_client_session_psk;
coap_new_client_session_psk2;
coap_new_context;
coap_new_endpoint;
coap_new_error_response;
coap_new_node;
coap_new_optlist;
coap_new_pdu;
coap_new_server_session;
coap_new_str_const;
coap_new_string;
coap_new_uri;
coap_opt_block_num;
coap_opt_encode;
coap_opt_encode_size;
coap_option_check_critical;
coap_option_filter_get;
coap_option_filter_set;
coap_option_filter_unset;
coap_option_iterator_init;
coap_option_next;
coap_opt_length;
coap_opt_parse;
coap_opt_setheader;
coap_opt_size;
coap_opt_value;
coap_package_name;
coap_package_version;
coap_packet_get_memmapped;
coap_pdu_clear;
coap_pdu_encode_header;
coap_pdu_init;
coap_pdu_parse;
coap_pdu_parse_header;
coap_pdu_parse_header_size;
coap_pdu_parse_opt;
coap_pdu_parse_size;
coap_pdu_resize;
coap_peek_next;
coap_pop_next;
coap_print_addr;
coap_print_link;
coap_print_wellknown;
coap_prng;
coap_prng_init;
coap_realloc_type;
coap_register_async;
coap_register_event_handler;
coap_register_handler;
coap_remove_async;
coap_remove_from_queue;
coap_resize_binary;
coap_resource_init;
coap_resource_notify_observers;
coap_resource_proxy_uri_init;
coap_resource_set_dirty;
coap_resource_unknown_init;
coap_response_phrase;
coap_retransmit;
coap_send;
coap_send_ack;
coap_send_error;
coap_send_message_type;
coap_session_connected;
coap_session_delay_pdu;
coap_session_disconnected;
coap_session_free;
coap_session_get_ack_random_factor;
coap_session_get_ack_timeout;
coap_session_get_app_data;
coap_session_get_by_peer;
coap_session_get_max_transmit;
coap_session_max_pdu_size;
coap_session_reference;
coap_session_release;
coap_session_send;
coap_session_send_csm;
coap_session_send_pdu;
coap_session_send_ping;
coap_session_set_ack_random_factor;
coap_session_set_ack_timeout;
coap_session_set_app_data;
coap_session_set_max_retransmit;
coap_session_set_mtu;
coap_session_str;
coap_session_write;
coap_set_app_data;
coap_set_event_handler;
coap_set_log_handler;
coap_set_log_level;
coap_set_prng;
coap_set_show_pdu_output;
coap_show_pdu;
coap_show_tls_version;
coap_socket_strerror;
coap_split_path;
coap_split_proxy_uri;
coap_split_query;
coap_split_uri;
coap_startup;
coap_string_tls_version;
coap_tcp_is_supported;
coap_ticks;
coap_ticks_from_rt_us;
coap_ticks_to_rt;
coap_ticks_to_rt_us;
coap_tls_is_supported;
coap_touch_observer;
coap_wait_ack;
coap_wellknown_response;
coap_write_block_opt;
local:
*;
};