| /mOS-networking-stack/samples/lighttpd-1.4.32/src/ |
| H A D | buffer.c | 22 b = malloc(sizeof(*b)); in buffer_init() 80 if (b->size) free(b->ptr); in buffer_prepare_copy() 87 b->ptr = malloc(b->size); in buffer_prepare_copy() 110 b->ptr = malloc(b->size); in buffer_prepare_append() 119 b->ptr = realloc(b->ptr, b->size); in buffer_prepare_append() 201 b->ptr[b->used - 1] = '\0'; in buffer_append_string_rfill() 226 b->ptr[b->used - 1] = '\0'; in buffer_append_string_len() 326 b->used += LI_ltostr(b->ptr + (b->used - 1), val); in buffer_append_long() 415 b = malloc(sizeof(*b)); in buffer_array_init() 460 b->ptr = malloc(sizeof(*b->ptr) * b->size); in buffer_array_append_get_buffer() [all …]
|
| H A D | mod_status.c | 149 buffer_append_string(b, key); in mod_status_row_append() 162 buffer_append_string(b, key); in mod_status_header_append() 174 buffer_append_string(b, key); in mod_status_header_append_sort() 178 buffer_append_string(b, key); in mod_status_header_append_sort() 202 buffer *b; in mod_status_handle_server_status_html() local 360 buffer_append_long(b, avg); in mod_status_handle_server_status_html() 385 buffer_append_long(b, avg); in mod_status_handle_server_status_html() 414 buffer_append_long(b, avg); in mod_status_handle_server_status_html() 566 buffer *b; in mod_status_handle_server_status_text() local 592 buffer_append_long(b, ts); in mod_status_handle_server_status_text() [all …]
|
| H A D | md5.c | 90 #define FF(a, b, c, d, x, s, ac) { \ argument 91 (a) += F ((b), (c), (d)) + (x) + (UINT4)(ac); \ 93 (a) += (b); \ 95 #define GG(a, b, c, d, x, s, ac) { \ argument 96 (a) += G ((b), (c), (d)) + (x) + (UINT4)(ac); \ 98 (a) += (b); \ 100 #define HH(a, b, c, d, x, s, ac) { \ argument 103 (a) += (b); \ 105 #define II(a, b, c, d, x, s, ac) { \ argument 108 (a) += (b); \ [all …]
|
| H A D | buffer.h | 38 void buffer_array_free(buffer_array *b); 39 void buffer_array_reset(buffer_array *b); 43 buffer* buffer_init_buffer(buffer *b); 45 void buffer_free(buffer *b); 46 void buffer_reset(buffer *b); 56 int buffer_copy_long(buffer *b, long val); 67 int buffer_append_long(buffer *b, long val); 81 int buffer_is_empty(buffer *b); 82 int buffer_is_equal(buffer *a, buffer *b); 103 int buffer_to_lower(buffer *b); [all …]
|
| H A D | mod_webdav.c | 478 buffer *b) { in webdav_gen_prop_tag() argument 487 buffer_append_string(b, prop_ns); in webdav_gen_prop_tag() 490 buffer_append_string(b, value); in webdav_gen_prop_tag() 499 buffer_append_string(b, prop_ns); in webdav_gen_prop_tag() 522 buffer_append_long(b, status); in webdav_gen_response_status_tag() 1099 buffer *b; in webdav_lockdiscovery() local 1213 buffer *b; in URIHANDLER_FUNC() local 1930 b = buffer_init(); in URIHANDLER_FUNC() 1932 buffer_free(b); in URIHANDLER_FUNC() 2035 b = buffer_init(); in URIHANDLER_FUNC() [all …]
|
| H A D | mod_accesslog.c | 682 buffer *b; in REQUESTDONE_FUNC() local 693 b = p->conf.access_logbuffer; in REQUESTDONE_FUNC() 694 if (b->used == 0) { in REQUESTDONE_FUNC() 785 buffer_append_off_t(b, in REQUESTDONE_FUNC() 851 buffer_append_string_len(b, in REQUESTDONE_FUNC() 870 buffer_append_string(b, colon+1); in REQUESTDONE_FUNC() 909 b->used > BUFFER_MAX_REUSE_SIZE) { in REQUESTDONE_FUNC() 912 if (b->used > 2) { in REQUESTDONE_FUNC() 914 syslog(LOG_INFO, "%*s", (int) b->used - 2, b->ptr); in REQUESTDONE_FUNC() 918 write(p->conf.log_access_fd, b->ptr, b->used - 1); in REQUESTDONE_FUNC() [all …]
|
| H A D | connections.c | 215 if (NULL == b || b->size - b->used < 1024) { 222 memset(b->ptr, 0, b->size); 225 read_offset = (b->used > 0) ? b->used - 1 : 0; 237 if (b->used > 0) b->used--; 239 b->ptr[b->used++] = '\0'; 353 if (NULL == b || b->size - b->used < 1024) { 358 read_offset = (b->used == 0) ? 0 : b->used - 1; 368 if (NULL == b || b->size - b->used < 1024) { 378 read_offset = (b->used == 0) ? 0 : b->used - 1; 418 if (b->used > 0) b->used--; [all …]
|
| H A D | response.c | 31 buffer *b; in http_response_write_header() local 127 con->bytes_header = b->used - 1; in http_response_write_header() 453 if (b->used > 2 && in http_response_prepare() 454 b->ptr[b->used-2] == '/' && in http_response_prepare() 455 (b->ptr[b->used-3] == ' ' || in http_response_prepare() 456 b->ptr[b->used-3] == '.')) { in http_response_prepare() 457 b->ptr[b->used--] = '\0'; in http_response_prepare() 460 for (i = b->used - 2; b->used > 1; i--) { in http_response_prepare() 461 if (b->ptr[i] == ' ' || in http_response_prepare() 462 b->ptr[i] == '.') { in http_response_prepare() [all …]
|
| H A D | http_chunk.c | 25 buffer *b; in http_chunk_append_len() local 27 b = srv->tmp_chunk_len; in http_chunk_append_len() 30 buffer_copy_string_len(b, CONST_STR_LEN("0")); in http_chunk_append_len() 37 buffer_prepare_copy(b, i + 1); in http_chunk_append_len() 40 b->ptr[j] = (len & 0xf) + (((len & 0xf) <= 9) ? '0' : 'a' - 10); in http_chunk_append_len() 43 b->used = i; in http_chunk_append_len() 44 b->ptr[b->used++] = '\0'; in http_chunk_append_len() 47 buffer_append_string_len(b, CONST_STR_LEN("\r\n")); in http_chunk_append_len() 48 chunkqueue_append_buffer(con->write_queue, b); in http_chunk_append_len()
|
| H A D | mod_ssi.c | 331 buffer *b = NULL; in process_ssi_stmt() local 462 buffer_copy_string(b, buf); in process_ssi_stmt() 473 buffer_copy_string(b, buf); in process_ssi_stmt() 484 buffer_copy_string(b, buf); in process_ssi_stmt() 495 buffer_copy_string(b, sl + 1); in process_ssi_stmt() 605 buffer_copy_off_t(b, s); in process_ssi_stmt() 606 buffer_append_string(b, abr[j]); in process_ssi_stmt() 616 buffer_copy_string(b, buf); in process_ssi_stmt() 808 if ((r = read(from_exec_fds[0], b->ptr, b->size - 1)) < 0) { in process_ssi_stmt() 812 b->used = r; in process_ssi_stmt() [all …]
|
| H A D | mod_cml.c | 182 buffer *b; in cache_call_lua() local 186 b = p->baseurl; in cache_call_lua() 187 buffer_copy_string_buffer(b, con->uri.path); in cache_call_lua() 188 for (c = b->ptr + b->used - 1; c > b->ptr && *c != '/'; c--); in cache_call_lua() 191 b->used = c - b->ptr + 2; in cache_call_lua() 195 b = p->basedir; in cache_call_lua() 196 buffer_copy_string_buffer(b, con->physical.path); in cache_call_lua() 197 for (c = b->ptr + b->used - 1; c > b->ptr && *c != '/'; c--); in cache_call_lua() 200 b->used = c - b->ptr + 2; in cache_call_lua()
|
| H A D | mod_staticfile.c | 288 buffer *b; in http_response_parse_range() local 293 buffer_append_string(b, boundary); in http_response_parse_range() 297 buffer_append_off_t(b, start); in http_response_parse_range() 299 buffer_append_off_t(b, end); in http_response_parse_range() 301 buffer_append_off_t(b, sce->st.st_size); in http_response_parse_range() 309 con->response.content_length += b->used - 1; in http_response_parse_range() 323 buffer *b; in http_response_parse_range() local 327 buffer_copy_string_len(b, "\r\n--", 4); in http_response_parse_range() 328 buffer_append_string(b, boundary); in http_response_parse_range() 329 buffer_append_string_len(b, "--\r\n", 4); in http_response_parse_range() [all …]
|
| H A D | mod_compress.c | 60 buffer *b; member 72 p->b = buffer_init(); in INIT_FUNC() 85 buffer_free(p->b); in FREE_FUNC() 284 p->b->used = 10; in deflate_file_to_buffer_gzip() 285 z.next_out = (unsigned char *)p->b->ptr + p->b->used; in deflate_file_to_buffer_gzip() 286 z.avail_out = p->b->size - p->b->used - 8; in deflate_file_to_buffer_gzip() 299 c = (unsigned char *)p->b->ptr + p->b->used; in deflate_file_to_buffer_gzip() 309 p->b->used += 8; in deflate_file_to_buffer_gzip() 550 r = write(ofd, p->b->ptr, p->b->used); in deflate_file_to_file() 587 buffer *b; in deflate_file_to_buffer() local [all …]
|
| H A D | mod_cml_lua.c | 63 buffer_copy_string(b, lua_tostring(L, curelem)); in lua_to_c_get_string() 212 buffer *b = buffer_init(); in cache_parse_lua() local 274 buffer_copy_string_buffer(b, con->uri.query); in cache_parse_lua() 275 cache_export_get_params(L, header_tbl, b); in cache_parse_lua() 276 buffer_reset(b); in cache_parse_lua() 302 if (0 == lua_to_c_get_string(L, "output_contenttype", b)) { in cache_parse_lua() 344 buffer_copy_string_buffer(b, p->basedir); in cache_parse_lua() 345 buffer_append_string(b, lua_tostring(L, -1)); in cache_parse_lua() 347 buffer_copy_string(b, lua_tostring(L, -1)); in cache_parse_lua() 350 if (HANDLER_ERROR == stat_cache_get_entry(srv, con, b, &sce)) { in cache_parse_lua() [all …]
|
| H A D | mod_cml_funcs.c | 38 buffer b; in f_crypto_md5() local 42 b.ptr = hex; in f_crypto_md5() 43 b.used = 0; in f_crypto_md5() 44 b.size = sizeof(hex); in f_crypto_md5() 60 buffer_copy_string_hex(&b, (char *)HA1, 16); in f_crypto_md5() 62 lua_pushstring(L, b.ptr); in f_crypto_md5()
|
| H A D | mod_fastcgi.c | 796 start = b->ptr; in parse_binpath() 798 switch(b->ptr[i]) { in parse_binpath() 811 b->ptr[i] = '\0'; in parse_binpath() 815 start = b->ptr + i + 1; in parse_binpath() 1819 buffer *b; in fcgi_create_env() local 2384 buffer *b; member 2467 packet->b->ptr[packet->b->used - 1] = '\0'; in fastcgi_get_packet() 2513 buffer *b; in fcgi_demux_response() local 2541 b->ptr[b->used - 1] = '\0'; in fcgi_demux_response() 2669 http_chunk_append_mem(srv, con, packet.b->ptr, packet.b->used); in fcgi_demux_response() [all …]
|
| /mOS-networking-stack/core/src/bpf/ |
| H A D | sf_optimize.c | 229 #define MAX(a,b) ((a)>(b)?(a):(b)) argument 295 for (b = levels[i]; b; b = b->link) 337 for (b = levels[i]; b != 0; b = b->link) 366 for (b = levels[i]; b; b = b->link) 717 JT(b) = JF(b); 932 JT(b) = JF(b); 934 JF(b) = JT(b); 1742 for (b = levels[i]; b != 0; b = b->link) 1758 *b = JT(*b); 2101 b->et.pred = b; [all …]
|
| H A D | sf_scanner.c | 3996 b->yy_buf_size += b->yy_buf_size / 8; in yy_get_next_buffer() 4268 if ( ! b ) in sfbpf__create_buffer() 4284 return b; in sfbpf__create_buffer() 4294 if ( ! b ) in sfbpf__delete_buffer() 4356 b->yy_buf_pos = &b->yy_ch_buf[0]; in sfbpf__flush_buffer() 4480 if ( ! b ) in sfbpf__scan_buffer() 4484 b->yy_buf_pos = b->yy_ch_buf = base; in sfbpf__scan_buffer() 4487 b->yy_n_chars = b->yy_buf_size; in sfbpf__scan_buffer() 4495 return b; in sfbpf__scan_buffer() 4538 if ( ! b ) in sfbpf__scan_bytes() [all …]
|
| H A D | sf_grammar.c | 575 struct block *b; member 2008 { gen_or((yyvsp[-2].blk).b, (yyvsp[0].blk).b); (yyval.blk) = (yyvsp[0].blk); } in yyparse() 2014 { gen_or((yyvsp[-2].blk).b, (yyvsp[0].blk).b); (yyval.blk) = (yyvsp[0].blk); } in yyparse() 2163 { gen_or((yyvsp[-2].blk).b, (yyvsp[0].blk).b); (yyval.blk) = (yyvsp[0].blk); } in yyparse() 2224 { (yyval.blk).b = (yyvsp[-1].blk).b; (yyval.blk).q = (yyvsp[-2].blk).q; } in yyparse() 2268 { (yyval.blk).b = (yyvsp[0].blk).b; (yyval.blk).q = qerr; } in yyparse() 2280 { (yyval.blk).b = (yyvsp[0].blk).b; (yyval.blk).q = qerr; } in yyparse() 3105 { (yyval.blk).b = (yyvsp[-1].blk).b; (yyval.blk).q = qerr; } in yyparse() 3122 { gen_or((yyvsp[-2].blk).b, (yyvsp[0].blk).b); (yyval.blk) = (yyvsp[0].blk); } in yyparse() 3182 { (yyval.blk).b = (yyvsp[-1].blk).b; (yyval.blk).q = qerr; } in yyparse() [all …]
|
| H A D | sf_gencode.c | 376 return b; 567 b->sense = !b->sense; 626 b = NULL; 656 return b; 688 return b; 1769 return b; 6697 gen_and(inst->b, b); 6698 inst->b = b; 6756 gen_and(inst->b, b); 6760 inst->b = b; [all …]
|
| /mOS-networking-stack/samples/common/ |
| H A D | applib.h | 11 #define MAX(a, b) ((a)>(b)?(a):(b)) argument 12 #define MIN(a, b) ((a)<(b)?(a):(b)) argument 28 #define TS_GT(a,b) ((int64_t)((a)-(b)) > 0) argument
|
| /mOS-networking-stack/core/src/include/ |
| H A D | tcp_in.h | 44 #define TCP_SEQ_LT(a,b) ((int32_t)((a)-(b)) < 0) argument 45 #define TCP_SEQ_LEQ(a,b) ((int32_t)((a)-(b)) <= 0) argument 46 #define TCP_SEQ_GT(a,b) ((int32_t)((a)-(b)) > 0) argument 47 #define TCP_SEQ_GEQ(a,b) ((int32_t)((a)-(b)) >= 0) argument 48 #define TCP_SEQ_BETWEEN(a,b,c) (TCP_SEQ_GEQ(a,b) && TCP_SEQ_LEQ(a,c)) argument
|
| H A D | timer.h | 10 #define TIMEVAL_ADD(a, b) \ argument 11 do { (a)->tv_sec += (b)->tv_sec; \ 12 if (((a)->tv_usec += (b)->tv_usec) > 1000000) { \ 16 #define TIMEVAL_LT(a, b) \ argument 17 timercmp(a, b, <)
|
| /mOS-networking-stack/core/src/ |
| H A D | eth_out.c | 37 #define MAX(a, b) ((a)>(b)?(a):(b)) argument 38 #define MIN(a, b) ((a)<(b)?(a):(b)) argument
|
| H A D | tcp_send_buffer.c | 8 #define MAX(a, b) ((a)>(b)?(a):(b)) argument 9 #define MIN(a, b) ((a)<(b)?(a):(b)) argument
|