Lines Matching refs:addrlen
98 int r = sockaddr_cmp(&k1->addr, k1->addrlen, &k2->addr, k2->addrlen); in infra_compfunc()
255 socklen_t addrlen; in wait_limit_netblock_findcreate() local
258 if(!netblockstrtoaddr(str, 0, &addr, &addrlen, &net)) { in wait_limit_netblock_findcreate()
269 addrlen, net); in wait_limit_netblock_findcreate()
278 if(!addr_tree_insert(tree, &d->node, &addr, addrlen, net)) { in wait_limit_netblock_findcreate()
441 hash_addr(struct sockaddr_storage* addr, socklen_t addrlen, in hash_addr() argument
446 if(addr_is_ip6(addr, addrlen)) { in hash_addr()
466 hash_infra(struct sockaddr_storage* addr, socklen_t addrlen, uint8_t* name) in hash_infra() argument
468 return dname_query_hash(name, hash_addr(addr, addrlen, 1)); in hash_infra()
474 socklen_t addrlen, uint8_t* name, size_t namelen, int wr) in infra_lookup_nottl() argument
477 k.addrlen = addrlen; in infra_lookup_nottl()
478 memcpy(&k.addr, addr, addrlen); in infra_lookup_nottl()
481 k.entry.hash = hash_infra(addr, addrlen, name); in infra_lookup_nottl()
519 socklen_t addrlen, uint8_t* name, size_t namelen, time_t tm) in new_entry() argument
538 key->entry.hash = hash_infra(addr, addrlen, name); in new_entry()
541 key->addrlen = addrlen; in new_entry()
542 memcpy(&key->addr, addr, addrlen); in new_entry()
549 socklen_t addrlen, uint8_t* nm, size_t nmlen, time_t timenow, in infra_host() argument
552 struct lruhash_entry* e = infra_lookup_nottl(infra, addr, addrlen, in infra_host()
564 e = infra_lookup_nottl(infra, addr, addrlen, nm, nmlen, 1); in infra_host()
584 if(!(e = new_entry(infra, addr, addrlen, nm, nmlen, timenow))) in infra_host()
603 e = infra_lookup_nottl(infra, addr,addrlen,nm,nmlen, 1); in infra_host()
621 socklen_t addrlen, uint8_t* nm, size_t nmlen, time_t timenow, in infra_set_lame() argument
627 e = infra_lookup_nottl(infra, addr, addrlen, nm, nmlen, 1); in infra_set_lame()
630 if(!(e = new_entry(infra, addr, addrlen, nm, nmlen, timenow))) { in infra_set_lame()
659 struct sockaddr_storage* addr, socklen_t addrlen, uint8_t* nm, in infra_update_tcp_works() argument
662 struct lruhash_entry* e = infra_lookup_nottl(infra, addr, addrlen, in infra_update_tcp_works()
677 socklen_t addrlen, uint8_t* nm, size_t nmlen, int qtype, in infra_rtt_update() argument
680 struct lruhash_entry* e = infra_lookup_nottl(infra, addr, addrlen, in infra_rtt_update()
687 if(!(e = new_entry(infra, addr, addrlen, nm, nmlen, timenow))) in infra_rtt_update()
739 struct sockaddr_storage* addr, socklen_t addrlen, uint8_t* nm, in infra_get_host_rto() argument
743 struct lruhash_entry* e = infra_lookup_nottl(infra, addr, addrlen, in infra_get_host_rto()
765 socklen_t addrlen, uint8_t* nm, size_t nmlen, int edns_version, in infra_edns_update() argument
768 struct lruhash_entry* e = infra_lookup_nottl(infra, addr, addrlen, in infra_edns_update()
773 if(!(e = new_entry(infra, addr, addrlen, nm, nmlen, timenow))) in infra_edns_update()
796 struct sockaddr_storage* addr, socklen_t addrlen, in infra_get_lame_rtt() argument
801 struct lruhash_entry* e = infra_lookup_nottl(infra, addr, addrlen, in infra_get_lame_rtt()
912 return sockaddr_cmp_addr(&k1->addr, k1->addrlen, in ip_rate_compfunc()
913 &k2->addr, k2->addrlen); in ip_rate_compfunc()
940 struct sockaddr_storage* addr, socklen_t addrlen, int wr) in infra_find_ip_ratedata() argument
943 hashvalue_type h = hash_addr(addr, addrlen, 0); in infra_find_ip_ratedata()
946 key.addrlen = addrlen; in infra_find_ip_ratedata()
981 struct sockaddr_storage* addr, socklen_t addrlen, time_t timenow, in infra_ip_create_ratedata() argument
984 hashvalue_type h = hash_addr(addr, addrlen, 0); in infra_ip_create_ratedata()
993 k->addrlen = addrlen; in infra_ip_create_ratedata()
1161 check_ip_ratelimit(struct sockaddr_storage* addr, socklen_t addrlen, in check_ip_ratelimit() argument
1174 addr_to_str(addr, addrlen, client_ip, sizeof(client_ip)); in check_ip_ratelimit()
1201 struct sockaddr_storage* addr, socklen_t addrlen, time_t timenow, in infra_ip_ratelimit_inc() argument
1212 entry = infra_find_ip_ratedata(infra, addr, addrlen, 1); in infra_ip_ratelimit_inc()
1219 return check_ip_ratelimit(addr, addrlen, buffer, premax, max, in infra_ip_ratelimit_inc()
1224 infra_ip_create_ratedata(infra, addr, addrlen, timenow, 0); in infra_ip_ratelimit_inc()