1// -*- mode:doc; -*- 2// vim: set syntax=asciidoc tw=0 3 4coap-rd(5) 5========== 6:doctype: manpage 7:man source: coap-rd 8:man version: @PACKAGE_VERSION@ 9:man manual: coap-rd Manual 10 11NAME 12----- 13coap-rd, 14coap-rd-gnutls , 15coap-rd-mbedtls, 16coap-rd-openssl, 17coap-rd-notls 18- CoAP Resource Directory based on libcoap 19 20SYNOPSIS 21-------- 22*coap-rd* [*-g* group] [*-p* port] [*-v* num] [*-w* [port][,secure_port]] 23 [*-A* address] [*-G* group_if] [*-T* max_token_size] [*-V* num] 24 [[*-h* hint] [*-k* key]] 25 [[*-c* certfile] [*-n*] [*-C* cafile] [*-R* trusted_casfile]] 26 27For *coap-rd* versions that use libcoap compiled for different 28(D)TLS libraries, *coap-rd-notls*, *coap-rd-gnutls*, 29*coap-rd-openssl*, *coap-rd-mbedtls* or *coap-rd-tinydtls* may be 30available. Otherwise, *coap-rd* uses the default libcoap (D)TLS support. 31 32DESCRIPTION 33----------- 34*coap-rd* is a simple CoAP Resource Directory server that can handle resource 35registrations using the protocol CoAP (RFC 7252). 36 37OPTIONS 38------- 39*-g* group:: 40 Join specified multicast 'group' on startup. 41 *Note:* DTLS over multicast is not currently supported. 42 43*-p* port:: 44 The 'port' on the given address will be listening for incoming connections. 45 If (D)TLS is supported, then 'port' + 1 will also be listened on for 46 (D)TLS connections. 47 The default port is 5683 if not given any other value. 48 49*-v* num:: 50 The verbosity level to use (default 4, maximum is 8) for general 51 CoAP logging. 52 53*-w* [port][,secure_port]:: 54 Enable WebSockets support support on port (WS) and/or secure_port (WSS), 55 comma separated. 56 57*-A* address:: 58 The local address of the interface which the server has to listen on. 59 60*-G* group_if:: 61 Use this interface for listening for the multicast group. This can be 62 different from the implied interface if the *-A* option is used. 63 64*-T* max_token_size:: 65 Set the maximum token length (8-65804). 66 67*-V* num:: 68 The verbosity level to use (default 3, maximum is 7) for (D)TLS 69 library logging. 70 71OPTIONS - PSK 72------------- 73(If supported by underlying (D)TLS library) 74 75*-h* hint:: 76 Identity Hint to send. Default is *CoAP*. Zero length is no hint. 77 78*-k* key:: 79 Pre-shared key to use for inbound connections. This cannot be empty if 80 defined. 81 *Note:* if *-c cafile* is defined, you need to define *-k key* as well to 82 have the server support both PSK and PKI. 83 84OPTIONS - PKI 85------------- 86(If supported by underlying (D)TLS library) 87 88*-c* certfile:: 89 Use the specified PEM file which contains the CERTIFICATE and PRIVATE 90 KEY information. 91 Note: if *-k key* is defined, you need to define *-c certfile* as well to 92 have the server support both PSK and PKI. 93 94*-n* :: 95 Disable remote peer certificate checking. This gives clients the ability to 96 use PKI, but without any defined certificates. 97 98*-C* cafile:: 99 PEM file that contains a list of one or more CAs that are to 100 be passed to the client for the client to determine what client certificate 101 to use. Normally, this list of CAs would be the root CA and and any 102 intermediate CAs. Ideally the server certificate should be signed by the 103 same CA so that mutual authentication can take place. The contents of 104 *cafile* are added to the trusted store of root CAs. Using the *-C* or *-R* 105 options will will trigger the validation of the client certificate unless 106 overridden by the *-n* option. 107 108*-R* trust_casfile:: 109 PEM file containing the set of trusted root CAs that are to be used to 110 validate the client certificate. Alternatively, this can point to a 111 directory containing a set of CA PEM files. The *-C cafile* CA does not have 112 to be in this list and is trusted for the validation. Using 113 *-R trust_casfile* disables common CA mutual authentication which can only 114 be done by using *-C cafile*. Using the *-C* or *-R* options will will 115 trigger the validation of the server certificate unless overridden by the 116 *-n* option. 117 118EXAMPLES 119-------- 120* Example 121---- 122coap-rd -A ::1 123---- 124Let the server listen on localhost (port 5683). 125 126* Example 127---- 128coap-rd -A ::1 -k mysecretKey -h myhint 129---- 130Let the server listen on localhost (port '5683' and '5684') with the server 131set up for PSK authentication. 132 133* Example 134---- 135coap-rd -A ::1 -p 13011 136---- 137Quite the same, except listening port is '13011' (and not the default port 1385683). 139 140* Example 141---- 142coap-rd -A 2001:db8:81a8:0:6ef0:dead:feed:beef -v 5 143---- 144The listening address is set to '2001:db8:81a8:0:6ef0:dead:feed:beef' and the 145verbosity level is set to '5'. 146 147* Example 148---- 149coap-rd -A 2001:db8:81a8:0:6ef0:dead:feed:beef -g FF02::FD 150---- 151Set listening address to '2001:db8:81a8:0:6ef0:dead:feed:beef' and join the 152All CoAP Nodes multicast group 'FF02::FD'. 153 154FILES 155------ 156There are no configuration files. 157 158EXIT STATUS 159----------- 160*0*:: 161 Success 162 163*1*:: 164 Failure (syntax or usage error; configuration error; document 165 processing failure; unexpected error) 166 167BUGS 168----- 169Please report bugs on the mailing list for libcoap: 170libcoap-developers@lists.sourceforge.net or raise an issue on GitHub at 171https://github.com/obgm/libcoap/issues 172 173AUTHORS 174------- 175The libcoap project <libcoap-developers@lists.sourceforge.net> 176