Lines Matching refs:s

83     if (!output_file.s || (output_file.length && output_file.s[0] == '-'))  in append_to_output()
86 if (!(file = fopen((char *)output_file.s, "w"))) { in append_to_output()
108 if (!output_file.s || (output_file.length && output_file.s[0] == '-')) in close_output()
148 if ( !coap_add_token(pdu, the_token.length, the_token.s)) { in coap_new_request()
196 if (!coap_add_token(pdu, the_token.length, the_token.s)) { in clear_obs()
270 memcpy(addrstr, server->s, server->length); in resolve_address()
311 memcmp(received->hdr->token, the_token.s, the_token.length) == 0; in check_token()
477 payload.s, in message_handler()
700 res = coap_split_path(uri.path.s, uri.path.length, buf, &buflen); in cmdline_uri()
715 res = coap_split_query(uri.query.s, uri.query.length, buf, &buflen); in cmdline_uri()
802 if ( (proxy.s = coap_malloc(proxy.length + 1)) == NULL) { in cmdline_proxy()
807 memcpy(proxy.s, arg, proxy.length+1); in cmdline_proxy()
813 strncpy((char *)the_token.s, arg, min(sizeof(_token_data), strlen(arg))); in cmdline_token()
876 check_segment(const unsigned char *s, size_t length) { in check_segment() argument
881 if (*s == '%') { in check_segment()
882 if (length < 2 || !(isxdigit(s[1]) && isxdigit(s[2]))) in check_segment()
885 s += 2; in check_segment()
889 ++s; ++n; --length; in check_segment()
903 buf->s = (unsigned char *)coap_malloc(len); in cmdline_input()
904 if (!buf->s) in cmdline_input()
908 decode_segment((unsigned char *)text, strlen(text), buf->s); in cmdline_input()
924 buf->s = (unsigned char *)coap_malloc(buf->length); in cmdline_input_from_file()
925 if (!buf->s) in cmdline_input_from_file()
937 buf->s = (unsigned char *)coap_malloc(buf->length); in cmdline_input_from_file()
938 if (!buf->s) in cmdline_input_from_file()
944 coap_free(buf->s); in cmdline_input_from_file()
949 len = fread(buf->s, 1, buf->length, inputfile); in cmdline_input_from_file()
954 coap_free(buf->s); in cmdline_input_from_file()
956 buf->s = NULL; in cmdline_input_from_file()
984 int s; in get_context() local
993 s = getaddrinfo(node, port, &hints, &result); in get_context()
994 if ( s != 0 ) { in get_context()
995 fprintf(stderr, "getaddrinfo: %s\n", gai_strerror(s)); in get_context()
1078 output_file.s = (unsigned char *)coap_malloc(output_file.length + 1); in main()
1080 if (!output_file.s) { in main()
1085 memcpy(output_file.s, optarg, output_file.length + 1); in main()
1175 || memcmp(addr, uri.host.s, uri.host.length) != 0)) { in main()
1181 uri.host.s)); in main()
1188 if (! (pdu = coap_new_request(ctx, method, &optlist, payload.s, payload.length))) in main()