Lines Matching refs:hdr

1088 		const buffer * const hdr = &ds->value;  in URIHANDLER_FUNC()  local
1089 forwarded = http_header_request_get(r, ds->ext, BUF_PTR_LEN(hdr)); in URIHANDLER_FUNC()
1319 static int hap_PROXY_recv (const int fd, union hap_PROXY_hdr * const hdr, const int family, const i… in hap_PROXY_recv() argument
1329 ret = recv(fd, hdr, sizeof(*hdr), MSG_PEEK|MSG_DONTWAIT|MSG_NOSIGNAL); in hap_PROXY_recv()
1341 if (ret >= 16 && 0 == memcmp(&hdr->v2, v2sig, 12) in hap_PROXY_recv()
1342 && (hdr->v2.ver_cmd & 0xF0) == 0x20) { in hap_PROXY_recv()
1344 sz = 16 + (size_t)ntohs(hdr->v2.len); in hap_PROXY_recv()
1348 switch (hdr->v2.ver_cmd & 0xF) { in hap_PROXY_recv()
1354 else if (ret >= 8 && 0 == memcmp(hdr->v1.line, "PROXY", 5)) { in hap_PROXY_recv()
1355 const char *end = memchr(hdr->v1.line, '\r', ret - 1); in hap_PROXY_recv()
1359 sz = (size_t)(end + 2 - hdr->v1.line); /* skip header + CRLF */ in hap_PROXY_recv()
1373 ret = recv(fd, hdr, sz, MSG_TRUNC|MSG_DONTWAIT|MSG_NOSIGNAL); in hap_PROXY_recv()
1377 ret = recv(fd, hdr, sz, MSG_DONTWAIT|MSG_NOSIGNAL); in hap_PROXY_recv()
1384 if (1 == ver) hdr->v1.line[sz-2] = '\0'; /*terminate str to ease parsing*/ in hap_PROXY_recv()
1404 union hap_PROXY_hdr * const hdr) in mod_extforward_hap_PROXY_v1() argument
1407 __coverity_tainted_data_sink__(hdr); in mod_extforward_hap_PROXY_v1()
1416 char *s = hdr->v1.line + sizeof("PROXY")-1; /*checked in hap_PROXY_recv()*/ in mod_extforward_hap_PROXY_v1()
1475 union hap_PROXY_hdr * const hdr) in mod_extforward_hap_PROXY_v2() argument
1478 __coverity_tainted_data_sink__(hdr); in mod_extforward_hap_PROXY_v2()
1512 uint32_t sz = ntohs(hdr->v2.len); in mod_extforward_hap_PROXY_v2()
1515 switch (hdr->v2.ver_cmd & 0xF) { in mod_extforward_hap_PROXY_v2()
1523 switch (hdr->v2.fam) { in mod_extforward_hap_PROXY_v2()
1525 sock_addr_assign(&con->dst_addr, AF_INET, hdr->v2.addr.ip4.src_port, in mod_extforward_hap_PROXY_v2()
1526 &hdr->v2.addr.ip4.src_addr); in mod_extforward_hap_PROXY_v2()
1531 hdr->v2.addr.ip4.dst_addr; in mod_extforward_hap_PROXY_v2()
1533 hdr->v2.addr.ip4.dst_port; in mod_extforward_hap_PROXY_v2()
1535 len = (uint32_t)sizeof(hdr->v2.addr.ip4); in mod_extforward_hap_PROXY_v2()
1539 sock_addr_assign(&con->dst_addr, AF_INET6, hdr->v2.addr.ip6.src_port, in mod_extforward_hap_PROXY_v2()
1540 &hdr->v2.addr.ip6.src_addr); in mod_extforward_hap_PROXY_v2()
1545 hdr->v2.addr.ip6.dst_addr, 16); in mod_extforward_hap_PROXY_v2()
1547 hdr->v2.addr.ip6.dst_port; in mod_extforward_hap_PROXY_v2()
1549 len = (uint32_t)sizeof(hdr->v2.addr.ip6); in mod_extforward_hap_PROXY_v2()
1555 char *src_addr = (char *)hdr->v2.addr.unx.src_addr; in mod_extforward_hap_PROXY_v2()
1556 char *z = memchr(src_addr, '\0', sizeof(hdr->v2.addr.unx.src_addr)); in mod_extforward_hap_PROXY_v2()
1567 hdr->v2.addr.unx.dst_addr, 108); in mod_extforward_hap_PROXY_v2()
1569 len = (uint32_t)sizeof(hdr->v2.addr.unx); in mod_extforward_hap_PROXY_v2()
1582 tlv = (struct pp2_tlv *)((char *)hdr + 16); in mod_extforward_hap_PROXY_v2()
1671 union hap_PROXY_hdr hdr; in mod_extforward_network_read() local
1674 int rc = hap_PROXY_recv(con->fd, &hdr, family, SOCK_STREAM); in mod_extforward_network_read()
1676 case 2: rc = mod_extforward_hap_PROXY_v2(con, &hdr); break; in mod_extforward_network_read()
1677 case 1: rc = mod_extforward_hap_PROXY_v1(con, &hdr); break; in mod_extforward_network_read()