New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
coap-client does not consider COAP_OPTION_PROXY_URI option in clear_obs #112
Comments
Why not simply provide a patch, diff or commit to see directly what you mean? That makes the life of all involved much easier. |
I can give it a try. I will create a clone, I will commit the change there in the master brunch and I will create a pull request. Does this sound ok? |
Yes, please go ahead. You could PR against develop as well. |
mrdeep1
added a commit
to mrdeep1/libcoap
that referenced
this issue
Mar 23, 2020
Add in support for RFC8768 Hop Limit and add in code to better support the Proxy-Uri CoAP Option. README.md: Add in RFC8768 is supported by libcoap. examples/client.c: Add in the -H hoplimit option. Make sure that the Proxy-Uri: option is added (if set) when clearing down an observation (fixes obgm#112). Check that Proxy-Uri: option has a maximum data length of 1034 bytes. Always add in Hop-Limit: CoAP option if Proxy-Uri: is in use. 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. 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/pdu.h: Add in the default Hop-Limit: option COAP_OPTION_HOP_LIMIT. Re-organize the COAP_OPTION_ descriptions to include the C, U, N and R flags. include/coap2/resource.h: Track whether a resource definition is for Proxy-Uri:. 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) being over the 10 definition limit in man/coap_resource.txt.in. man/coap-client.txt.in: Document the new -H hoplimit option. 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.txt.in: Include the new RFC8768. man/coap_resource.txt.in: Include documentation for coap_resource_proxy_uri_init(). Update documentation for the CoAP options. src/coap_debug.c: Add in support for printing out COAP_OPTION_HOP_LIMIT. Output the Proxy-Scheme: Option as text. src/net.c: Make sure that COAP_OPTION_HOP_LIMIT is not returned in an error response. Sanity check and handle COAP_OPTION_PROXY_URI and COAP_OPTION_PROXY_SCHEME in handle_request(). src/pdu.c: Report on CoAP options that are repeated, but not defined as repeatable. Define new (5.08) Hop Limit Reached error response. 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.
mrdeep1
added a commit
to mrdeep1/libcoap
that referenced
this issue
Mar 23, 2020
Add in support for RFC8768 Hop Limit and add in code to better support the Proxy-Uri CoAP Option. README.md: Add in RFC8768 is supported by libcoap. examples/client.c: Add in the -H hoplimit option. Make sure that the Proxy-Uri: option is added (if set) when clearing down an observation (fixes obgm#112). Check that Proxy-Uri: option has a maximum data length of 1034 bytes. Always add in Hop-Limit: CoAP option if Proxy-Uri: is in use. 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. 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/pdu.h: Add in the default Hop-Limit: option COAP_OPTION_HOP_LIMIT. Re-organize the COAP_OPTION_ descriptions to include the C, U, N and R flags. include/coap2/resource.h: Track whether a resource definition is for Proxy-Uri:. 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) being over the 10 definition limit in man/coap_resource.txt.in. man/coap-client.txt.in: Document the new -H hoplimit option. 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.txt.in: Include the new RFC8768. man/coap_resource.txt.in: Include documentation for coap_resource_proxy_uri_init(). Update documentation for the CoAP options. src/coap_debug.c: Add in support for printing out COAP_OPTION_HOP_LIMIT. Output the Proxy-Scheme: Option as text. src/net.c: Make sure that COAP_OPTION_HOP_LIMIT is not returned in an error response. Sanity check and handle COAP_OPTION_PROXY_URI and COAP_OPTION_PROXY_SCHEME in handle_request(). src/pdu.c: Report on CoAP options that are repeated, but not defined as repeatable. Define new (5.08) Hop Limit Reached error response. 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.
mrdeep1
added a commit
to mrdeep1/libcoap
that referenced
this issue
Apr 2, 2020
Add in support for RFC8768 Hop Limit and add in code to better support the Proxy-Uri CoAP Option. README.md: Add in RFC8768 is supported by libcoap. examples/client.c: Add in the -H hoplimit option. Make sure that the Proxy-Uri: option is added (if set) when clearing down an observation (fixes obgm#112). Check that Proxy-Uri: option has a maximum data length of 1034 bytes. Always add in Hop-Limit: CoAP option if Proxy-Uri: is in use. 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. 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/pdu.h: Add in the default Hop-Limit: option COAP_OPTION_HOP_LIMIT. Re-organize the COAP_OPTION_ descriptions to include the C, U, N and R flags. include/coap2/resource.h: Track whether a resource definition is for Proxy-Uri:. 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) being over the 10 definition limit in man/coap_resource.txt.in. man/coap-client.txt.in: Document the new -H hoplimit option. 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.txt.in: Include the new RFC8768. man/coap_resource.txt.in: Include documentation for coap_resource_proxy_uri_init(). Update documentation for the CoAP options. src/coap_debug.c: Add in support for printing out COAP_OPTION_HOP_LIMIT. Output the Proxy-Scheme: Option as text. src/net.c: Make sure that COAP_OPTION_HOP_LIMIT is not returned in an error response. Sanity check and handle COAP_OPTION_PROXY_URI and COAP_OPTION_PROXY_SCHEME in handle_request(). src/pdu.c: Report on CoAP options that are repeated, but not defined as repeatable. Define new (5.08) Hop Limit Reached error response. 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.
mrdeep1
added a commit
to mrdeep1/libcoap
that referenced
this issue
May 4, 2020
Add in support for RFC8768 Hop Limit and add in code to better support the Proxy-Uri CoAP Option. README.md: Add in RFC8768 is supported by libcoap. examples/client.c: Add in the -H hoplimit option. Make sure that the Proxy-Uri: option is added (if set) when clearing down an observation (fixes obgm#112). Check that Proxy-Uri: option has a maximum data length of 1034 bytes. Always add in Hop-Limit: CoAP option if Proxy-Uri: is in use. 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. 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/pdu.h: Add in the default Hop-Limit: option COAP_OPTION_HOP_LIMIT. Re-organize the COAP_OPTION_ descriptions to include the C, U, N and R flags. include/coap2/resource.h: Track whether a resource definition is for Proxy-Uri:. 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) being over the 10 definition limit in man/coap_resource.txt.in. man/coap-client.txt.in: Document the new -H hoplimit option. 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.txt.in: Include the new RFC8768. man/coap_resource.txt.in: Include documentation for coap_resource_proxy_uri_init(). Update documentation for the CoAP options. src/coap_debug.c: Add in support for printing out COAP_OPTION_HOP_LIMIT. Output the Proxy-Scheme: Option as text. src/net.c: Make sure that COAP_OPTION_HOP_LIMIT is not returned in an error response. Sanity check and handle COAP_OPTION_PROXY_URI and COAP_OPTION_PROXY_SCHEME in handle_request(). src/pdu.c: Report on CoAP options that are repeated, but not defined as repeatable. Define new (5.08) Hop Limit Reached error response. 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.
mrdeep1
added a commit
to mrdeep1/libcoap
that referenced
this issue
May 6, 2020
Add in support for RFC8768 Hop Limit and add in code to better support the Proxy-Uri CoAP Option. README.md: Add in RFC8768 is supported by libcoap. examples/client.c: Add in the -H hoplimit option. Make sure that the Proxy-Uri: option is added (if set) when clearing down an observation (fixes obgm#112). Check that Proxy-Uri: option has a maximum data length of 1034 bytes. Always add in Hop-Limit: CoAP option if Proxy-Uri: is in use. 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. 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/pdu.h: Add in the default Hop-Limit: option COAP_OPTION_HOP_LIMIT. Re-organize the COAP_OPTION_ descriptions to include the C, U, N and R flags. include/coap2/resource.h: Track whether a resource definition is for Proxy-Uri:. 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) being over the 10 definition limit in man/coap_resource.txt.in. man/coap-client.txt.in: Document the new -H hoplimit option. 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.txt.in: Include the new RFC8768. man/coap_resource.txt.in: Include documentation for coap_resource_proxy_uri_init(). Update documentation for the CoAP options. src/coap_debug.c: Add in support for printing out COAP_OPTION_HOP_LIMIT. Output the Proxy-Scheme: Option as text. src/net.c: Make sure that COAP_OPTION_HOP_LIMIT is not returned in an error response. Sanity check and handle COAP_OPTION_PROXY_URI and COAP_OPTION_PROXY_SCHEME in handle_request(). src/pdu.c: Report on CoAP options that are repeated, but not defined as repeatable. Define new (5.08) Hop Limit Reached error response. 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.
mrdeep1
added a commit
to mrdeep1/libcoap
that referenced
this issue
May 12, 2020
Add in support for RFC8768 Hop Limit and add in code to better support the Proxy-Uri CoAP Option. README.md: Add in RFC8768 is supported by libcoap. examples/client.c: Add in the -H hoplimit option. Make sure that the Proxy-Uri: option is added (if set) when clearing down an observation (fixes obgm#112). Check that Proxy-Uri: option has a maximum data length of 1034 bytes. Always add in Hop-Limit: CoAP option if Proxy-Uri: is in use. 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. 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/pdu.h: Add in the default Hop-Limit: option COAP_OPTION_HOP_LIMIT. Re-organize the COAP_OPTION_ descriptions to include the C, U, N, R, E, I and U flags. include/coap2/resource.h: Track whether a resource definition is for Proxy-Uri:. 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) being over the 10 definition limit in man/coap_resource.txt.in. man/coap-client.txt.in: Document the new -H hoplimit option. 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.txt.in: Include the new RFC8768. man/coap_resource.txt.in: Include documentation for coap_resource_proxy_uri_init(). Update documentation for the CoAP options. src/coap_debug.c: Add in support for printing out COAP_OPTION_HOP_LIMIT. Output the Proxy-Scheme: Option as text. src/net.c: Make sure that COAP_OPTION_HOP_LIMIT is not returned in an error response. Sanity check and handle COAP_OPTION_PROXY_URI and COAP_OPTION_PROXY_SCHEME in handle_request(). src/pdu.c: Report on CoAP options that are repeated, but not defined as repeatable. Define new (5.08) Hop Limit Reached error response. 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.
mrdeep1
added a commit
to mrdeep1/libcoap
that referenced
this issue
Jun 15, 2020
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 obgm#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.
mrdeep1
added a commit
to mrdeep1/libcoap
that referenced
this issue
Jul 23, 2020
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 obgm#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
mrdeep1
added a commit
to mrdeep1/libcoap
that referenced
this issue
Aug 12, 2020
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 obgm#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
mrdeep1
added a commit
to mrdeep1/libcoap
that referenced
this issue
Sep 8, 2020
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 obgm#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
mrdeep1
added a commit
to mrdeep1/libcoap
that referenced
this issue
Oct 14, 2020
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 obgm#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
mrdeep1
added a commit
to mrdeep1/libcoap
that referenced
this issue
Oct 18, 2020
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 obgm#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
mrdeep1
added a commit
to mrdeep1/libcoap
that referenced
this issue
Oct 22, 2020
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 obgm#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
mrdeep1
added a commit
to mrdeep1/libcoap
that referenced
this issue
Oct 27, 2020
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 obgm#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
mrdeep1
added a commit
to mrdeep1/libcoap
that referenced
this issue
Oct 28, 2020
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 obgm#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
mrdeep1
added a commit
to mrdeep1/libcoap
that referenced
this issue
Nov 2, 2020
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 obgm#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
mrdeep1
added a commit
to mrdeep1/libcoap
that referenced
this issue
Nov 4, 2020
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 obgm#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
mrdeep1
added a commit
to mrdeep1/libcoap
that referenced
this issue
Nov 11, 2020
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 obgm#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
mrdeep1
added a commit
to mrdeep1/libcoap
that referenced
this issue
Nov 11, 2020
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 obgm#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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
coap-client does not include in the PDU the COAP_OPTION_PROXY_URI when the clear_obs function is invoked.
In examples/client.c line:237 (this line concerns the develop brunch, in master it is line 228) case COAP_OPTION_PROXY_URI : should be added.
The text was updated successfully, but these errors were encountered: