diff --git a/examples/client.c b/examples/client.c index 94a4aca2..419e75fd 100644 --- a/examples/client.c +++ b/examples/client.c @@ -523,13 +523,15 @@ message_handler(struct coap_context_t *ctx, static void usage( const char *program, const char *version) { const char *p; + char buffer[64]; p = strrchr( program, '/' ); if ( p ) program = ++p; fprintf( stderr, "%s v%s -- a small CoAP implementation\n" - "(c) 2010-2015 Olaf Bergmann \n\n" + "(c) 2010-2018 Olaf Bergmann \n\n" + "%s\n\n" "Usage: %s [-a addr] [-b [num,]size] [-c certfile] [-C cafile] [-e text]\n" "\t\t[-f file] [-k key] [-l loss] [-m method] [-o file]\n" "\t\t[-p port] [-r] [-s duration] [-t type] [-u user]\n" @@ -591,7 +593,8 @@ usage( const char *program, const char *version) { "\tcoap-client -m get coap://[::1]/.well-known/core\n" "\tcoap-client -m get -T cafe coap://[::1]/time\n" "\techo -n 1000 | coap-client -m put -T cafe coap://[::1]/time -f -\n" - ,program, version, program, wait_seconds); + ,program, version, coap_string_tls_version(buffer, sizeof(buffer)) + ,program, wait_seconds); } typedef struct { diff --git a/examples/coap-rd.c b/examples/coap-rd.c index 6c4b38f0..4ee1295d 100644 --- a/examples/coap-rd.c +++ b/examples/coap-rd.c @@ -552,6 +552,7 @@ init_resources(coap_context_t *ctx) { static void usage( const char *program, const char *version) { const char *p; + char buffer[64]; p = strrchr( program, '/' ); if ( p ) @@ -559,11 +560,13 @@ usage( const char *program, const char *version) { fprintf( stderr, "%s v%s -- CoRE Resource Directory implementation\n" "(c) 2011-2012 Olaf Bergmann \n\n" + "%s\n\n" "usage: %s [-A address] [-p port]\n\n" "\t-A address\tinterface address to bind to\n" "\t-p port\t\tlisten on specified port\n" "\t-v num\t\tverbosity level (default: 3)\n", - program, version, program ); + program, version, coap_string_tls_version(buffer, sizeof(buffer)), + program); } static coap_context_t * diff --git a/examples/coap-server.c b/examples/coap-server.c index 35009150..bfafc547 100644 --- a/examples/coap-server.c +++ b/examples/coap-server.c @@ -709,6 +709,7 @@ fill_keystore(coap_context_t *ctx) { static void usage( const char *program, const char *version) { const char *p; + char buffer[64]; p = strrchr( program, '/' ); if ( p ) @@ -716,6 +717,7 @@ usage( const char *program, const char *version) { fprintf( stderr, "%s v%s -- a small CoAP implementation\n" "(c) 2010,2011,2015-2018 Olaf Bergmann \n\n" + "%s\n\n" "Usage: %s [-A address] [-g group] [-p port] [-l loss] [-c certfile]\n" "\t\t[-C cafile] [-R root_cafile] [-k key] [-h hint] [-N]\n" "\t\t[-v num] [-d max]\n\n" @@ -756,7 +758,8 @@ usage( const char *program, const char *version) { "\t-d max \t\tAllow dynamic creation of up to a total of max resources.\n" "\t \t\tIf max is reached, a 4.06 code is returned until one of the\n" "\t \t\tdynamic resources has been deleted\n", - program, version, program ); + program, version, coap_string_tls_version(buffer, sizeof(buffer)), + program); } static coap_context_t *