/dports/net/haproxy19/haproxy-1.9.16/src/ |
H A D | hpack-tbl.c | 109 return ((dht->head + 1U < dht->used) ? dht->wrap : 0) + dht->head + 1U - dht->used; in hpack_dht_get_tail() 126 dht->dte[slot].addr, dht->dte[slot].addr+dht->dte[slot].nlen+dht->dte[slot].vlen-1); in hpack_dht_dump() 140 if (dht->front >= dht->wrap) in hpack_dht_check_consistency() 143 if (dht->used > dht->wrap) in hpack_dht_check_consistency() 146 if (dht->head >= dht->wrap) in hpack_dht_check_consistency() 229 dht->total -= dht->dte[tail].nlen + dht->dte[tail].vlen; in __hpack_dht_make_room() 231 dht->front = dht->head; in __hpack_dht_make_room() 239 dht->front = dht->head = 0; in __hpack_dht_make_room() 243 dht->wrap = dht->head + 1; in __hpack_dht_make_room() 293 if ((sizeof(*dht) + (wrap + 1) * sizeof(dht->dte[0]) <= dht->dte[dht->front].addr)) in hpack_dht_insert() [all …]
|
/dports/net/haproxy20/haproxy-2.0.26/src/ |
H A D | hpack-tbl.c | 109 return ((dht->head + 1U < dht->used) ? dht->wrap : 0) + dht->head + 1U - dht->used; in hpack_dht_get_tail() 126 dht->dte[slot].addr, dht->dte[slot].addr+dht->dte[slot].nlen+dht->dte[slot].vlen-1); in hpack_dht_dump() 140 if (dht->front >= dht->wrap) in hpack_dht_check_consistency() 143 if (dht->used > dht->wrap) in hpack_dht_check_consistency() 146 if (dht->head >= dht->wrap) in hpack_dht_check_consistency() 229 dht->total -= dht->dte[tail].nlen + dht->dte[tail].vlen; in __hpack_dht_make_room() 231 dht->front = dht->head; in __hpack_dht_make_room() 239 dht->front = dht->head = 0; in __hpack_dht_make_room() 243 dht->wrap = dht->head + 1; in __hpack_dht_make_room() 293 if ((sizeof(*dht) + (wrap + 1) * sizeof(dht->dte[0]) <= dht->dte[dht->front].addr)) in hpack_dht_insert() [all …]
|
/dports/net/haproxy21/haproxy-2.1.12/src/ |
H A D | hpack-tbl.c | 109 return ((dht->head + 1U < dht->used) ? dht->wrap : 0) + dht->head + 1U - dht->used; in hpack_dht_get_tail() 126 dht->dte[slot].addr, dht->dte[slot].addr+dht->dte[slot].nlen+dht->dte[slot].vlen-1); in hpack_dht_dump() 140 if (dht->front >= dht->wrap) in hpack_dht_check_consistency() 143 if (dht->used > dht->wrap) in hpack_dht_check_consistency() 146 if (dht->head >= dht->wrap) in hpack_dht_check_consistency() 229 dht->total -= dht->dte[tail].nlen + dht->dte[tail].vlen; in __hpack_dht_make_room() 231 dht->front = dht->head; in __hpack_dht_make_room() 239 dht->front = dht->head = 0; in __hpack_dht_make_room() 243 dht->wrap = dht->head + 1; in __hpack_dht_make_room() 293 if ((sizeof(*dht) + (wrap + 1) * sizeof(dht->dte[0]) <= dht->dte[dht->front].addr)) in hpack_dht_insert() [all …]
|
/dports/net/haproxy18/haproxy-1.8.30/src/ |
H A D | hpack-tbl.c | 109 return ((dht->head + 1U < dht->used) ? dht->wrap : 0) + dht->head + 1U - dht->used; in hpack_dht_get_tail() 126 dht->dte[slot].addr, dht->dte[slot].addr+dht->dte[slot].nlen+dht->dte[slot].vlen-1); in hpack_dht_dump() 140 if (dht->front >= dht->wrap) in hpack_dht_check_consistency() 143 if (dht->used > dht->wrap) in hpack_dht_check_consistency() 146 if (dht->head >= dht->wrap) in hpack_dht_check_consistency() 229 dht->total -= dht->dte[tail].nlen + dht->dte[tail].vlen; in __hpack_dht_make_room() 231 dht->front = dht->head; in __hpack_dht_make_room() 239 dht->front = dht->head = 0; in __hpack_dht_make_room() 243 dht->wrap = dht->head + 1; in __hpack_dht_make_room() 293 if ((sizeof(*dht) + (wrap + 1) * sizeof(dht->dte[0]) <= dht->dte[dht->front].addr)) in hpack_dht_insert() [all …]
|
/dports/net/nuster/nuster-5.0.4.21/src/ |
H A D | hpack-tbl.c | 109 return ((dht->head + 1U < dht->used) ? dht->wrap : 0) + dht->head + 1U - dht->used; in hpack_dht_get_tail() 126 dht->dte[slot].addr, dht->dte[slot].addr+dht->dte[slot].nlen+dht->dte[slot].vlen-1); in hpack_dht_dump() 140 if (dht->front >= dht->wrap) in hpack_dht_check_consistency() 143 if (dht->used > dht->wrap) in hpack_dht_check_consistency() 146 if (dht->head >= dht->wrap) in hpack_dht_check_consistency() 229 dht->total -= dht->dte[tail].nlen + dht->dte[tail].vlen; in __hpack_dht_make_room() 231 dht->front = dht->head; in __hpack_dht_make_room() 239 dht->front = dht->head = 0; in __hpack_dht_make_room() 243 dht->wrap = dht->head + 1; in __hpack_dht_make_room() 293 if ((sizeof(*dht) + (wrap + 1) * sizeof(dht->dte[0]) <= dht->dte[dht->front].addr)) in hpack_dht_insert() [all …]
|
/dports/net/haproxy22/haproxy-2.2.19/src/ |
H A D | hpack-tbl.c | 118 dht->dte[slot].addr, dht->dte[slot].addr+dht->dte[slot].nlen+dht->dte[slot].vlen-1); in hpack_dht_dump() 132 if (dht->front >= dht->wrap) in hpack_dht_check_consistency() 135 if (dht->used > dht->wrap) in hpack_dht_check_consistency() 138 if (dht->head >= dht->wrap) in hpack_dht_check_consistency() 221 dht->total -= dht->dte[tail].nlen + dht->dte[tail].vlen; in __hpack_dht_make_room() 223 dht->front = dht->head; in __hpack_dht_make_room() 231 dht->front = dht->head = 0; in __hpack_dht_make_room() 235 dht->wrap = dht->head + 1; in __hpack_dht_make_room() 263 dht->front = dht->head = 0; in hpack_dht_insert() 285 if ((sizeof(*dht) + (wrap + 1) * sizeof(dht->dte[0]) <= dht->dte[dht->front].addr)) in hpack_dht_insert() [all …]
|
/dports/net/haproxy23/haproxy-2.3.16/src/ |
H A D | hpack-tbl.c | 118 dht->dte[slot].addr, dht->dte[slot].addr+dht->dte[slot].nlen+dht->dte[slot].vlen-1); in hpack_dht_dump() 132 if (dht->front >= dht->wrap) in hpack_dht_check_consistency() 135 if (dht->used > dht->wrap) in hpack_dht_check_consistency() 138 if (dht->head >= dht->wrap) in hpack_dht_check_consistency() 221 dht->total -= dht->dte[tail].nlen + dht->dte[tail].vlen; in __hpack_dht_make_room() 223 dht->front = dht->head; in __hpack_dht_make_room() 231 dht->front = dht->head = 0; in __hpack_dht_make_room() 235 dht->wrap = dht->head + 1; in __hpack_dht_make_room() 263 dht->front = dht->head = 0; in hpack_dht_insert() 285 if ((sizeof(*dht) + (wrap + 1) * sizeof(dht->dte[0]) <= dht->dte[dht->front].addr)) in hpack_dht_insert() [all …]
|
/dports/net/haproxy/haproxy-2.4.10/src/ |
H A D | hpack-tbl.c | 122 dht->dte[slot].addr, dht->dte[slot].addr+dht->dte[slot].nlen+dht->dte[slot].vlen-1); in hpack_dht_dump() 136 if (dht->front >= dht->wrap) in hpack_dht_check_consistency() 139 if (dht->used > dht->wrap) in hpack_dht_check_consistency() 142 if (dht->head >= dht->wrap) in hpack_dht_check_consistency() 225 dht->total -= dht->dte[tail].nlen + dht->dte[tail].vlen; in __hpack_dht_make_room() 227 dht->front = dht->head; in __hpack_dht_make_room() 235 dht->front = dht->head = 0; in __hpack_dht_make_room() 239 dht->wrap = dht->head + 1; in __hpack_dht_make_room() 267 dht->front = dht->head = 0; in hpack_dht_insert() 289 if ((sizeof(*dht) + (wrap + 1) * sizeof(dht->dte[0]) <= dht->dte[dht->front].addr)) in hpack_dht_insert() [all …]
|
/dports/net-im/dendrite/dendrite-0.5.1/vendor/github.com/libp2p/go-libp2p-kad-dht/ |
H A D | dht.go | 1 package dht package 219 dht.proc.AddChild(dht.ProviderManager.Process()) 225 dht.proc.Go(dht.rtPeerLoop) 230 dht.peerFound(dht.ctx, p, false) 234 dht.proc.Go(dht.populatePeers) 247 return dht 258 return dht 424 dht.fixLowPeers(dht.ctx) 433 dht.proc.Go(dht.fixLowPeersRoutine) 451 dht.fixLowPeers(dht.Context()) [all …]
|
H A D | subscriber_notifee.go | 1 package dht package 20 dht *IpfsDHT member 42 if dht.auto == ModeAuto || dht.auto == ModeAutoServer { 52 dht: dht, 63 dht := nn.dht 81 if dht.autoRefresh || dht.testAddressUpdateProcessing { 89 if dht.auto == ModeAuto || dht.auto == ModeAutoServer { 111 dht.peerFound(dht.ctx, p, false) 114 dht.peerStoppedDHT(dht.ctx, p) 154 …return dht.routingTablePeerFilter == nil || dht.routingTablePeerFilter(dht, dht.Host().Network().C… [all …]
|
H A D | handlers.go | 1 package dht package 28 return dht.handleFindPeer 30 return dht.handlePing 33 if dht.enableValues { 36 return dht.handleGetValue 38 return dht.handlePutValue 42 if dht.enableProviders { 71 closer := dht.betterPeersToQuery(pmes, p, dht.bucketSize) 79 "local", dht.self, 268 closest = dht.betterPeersToQuery(pmes, from, dht.bucketSize) [all …]
|
H A D | routing.go | 1 package dht package 31 if !dht.enableValues { 103 if !dht.enableValues { 137 if !dht.enableValues { 178 dht.updatePeerValues(dht.Context(), key, best, updatePeers) 208 if !dht.enableValues { 275 if p == dht.self { 302 From: dht.self, 405 dht.ProviderManager.AddProvider(ctx, keyMH, dht.self) 472 ID: dht.self, [all …]
|
/dports/net/haproxy/haproxy-2.4.10/include/haproxy/ |
H A D | hpack-tbl.h | 67 if (idx >= dht->used) in hpack_get_dte() 70 if (idx <= dht->head) in hpack_get_dte() 73 idx = dht->head - idx + dht->wrap; in hpack_get_dte() 139 return ((dht->head + 1U < dht->used) ? dht->wrap : 0) + dht->head + 1U - dht->used; in hpack_dht_get_tail() 148 if (dht->used * 32 + dht->total + needed + 32 <= dht->size) in hpack_dht_make_room() 150 else if (!dht->used) in hpack_dht_make_room() 159 dht->size = size; in hpack_dht_init() 160 dht->total = 0; in hpack_dht_init() 161 dht->used = 0; in hpack_dht_init() 173 if (dht) in hpack_dht_alloc() [all …]
|
/dports/net/haproxy22/haproxy-2.2.19/include/haproxy/ |
H A D | hpack-tbl.h | 67 if (idx >= dht->used) in hpack_get_dte() 70 if (idx <= dht->head) in hpack_get_dte() 73 idx = dht->head - idx + dht->wrap; in hpack_get_dte() 139 return ((dht->head + 1U < dht->used) ? dht->wrap : 0) + dht->head + 1U - dht->used; in hpack_dht_get_tail() 148 if (dht->used * 32 + dht->total + needed + 32 <= dht->size) in hpack_dht_make_room() 150 else if (!dht->used) in hpack_dht_make_room() 159 dht->size = size; in hpack_dht_init() 160 dht->total = 0; in hpack_dht_init() 161 dht->used = 0; in hpack_dht_init() 173 if (dht) in hpack_dht_alloc() [all …]
|
/dports/net/haproxy23/haproxy-2.3.16/include/haproxy/ |
H A D | hpack-tbl.h | 67 if (idx >= dht->used) in hpack_get_dte() 70 if (idx <= dht->head) in hpack_get_dte() 73 idx = dht->head - idx + dht->wrap; in hpack_get_dte() 139 return ((dht->head + 1U < dht->used) ? dht->wrap : 0) + dht->head + 1U - dht->used; in hpack_dht_get_tail() 148 if (dht->used * 32 + dht->total + needed + 32 <= dht->size) in hpack_dht_make_room() 150 else if (!dht->used) in hpack_dht_make_room() 159 dht->size = size; in hpack_dht_init() 160 dht->total = 0; in hpack_dht_init() 161 dht->used = 0; in hpack_dht_init() 173 if (dht) in hpack_dht_alloc() [all …]
|
/dports/net-im/dendrite/dendrite-0.5.1/vendor/github.com/libp2p/go-libp2p-kad-dht/opts/ |
H A D | options.go | 13 type Option = dht.Option 31 func Datastore(ds ds.Batching) dht.Option { return dht.Datastore(ds) } 39 return dht.Mode(dht.ModeClient) 41 return dht.Mode(dht.ModeAuto) 45 func Mode(m dht.ModeOpt) dht.Option { return dht.Mode(m) } 48 func Validator(v record.Validator) dht.Option { return dht.Validator(v) } 56 func BucketSize(bucketSize int) dht.Option { return dht.BucketSize(bucketSize) } 59 func MaxRecordAge(maxAge time.Duration) dht.Option { return dht.MaxRecordAge(maxAge) } 62 func DisableAutoRefresh() dht.Option { return dht.DisableAutoRefresh() } 65 func DisableProviders() dht.Option { return dht.DisableProviders() } [all …]
|
/dports/net/haproxy19/haproxy-1.9.16/include/common/ |
H A D | hpack-tbl.h | 153 idx = dht->head - idx + dht->wrap; in hpack_get_dte() 220 if (dht->used * 32 + dht->total + needed + 32 <= dht->size) in hpack_dht_make_room() 222 else if (!dht->used) in hpack_dht_make_room() 231 dht->size = size; in hpack_dht_init() 232 dht->total = 0; in hpack_dht_init() 233 dht->used = 0; in hpack_dht_init() 241 dht = malloc(size); in hpack_dht_alloc() 242 if (!dht) in hpack_dht_alloc() 243 return dht; in hpack_dht_alloc() 246 return dht; in hpack_dht_alloc() [all …]
|
/dports/net/haproxy21/haproxy-2.1.12/include/common/ |
H A D | hpack-tbl.h | 164 idx = dht->head - idx + dht->wrap; in hpack_get_dte() 231 if (dht->used * 32 + dht->total + needed + 32 <= dht->size) in hpack_dht_make_room() 233 else if (!dht->used) in hpack_dht_make_room() 242 dht->size = size; in hpack_dht_init() 243 dht->total = 0; in hpack_dht_init() 244 dht->used = 0; in hpack_dht_init() 252 dht = malloc(size); in hpack_dht_alloc() 253 if (!dht) in hpack_dht_alloc() 254 return dht; in hpack_dht_alloc() 257 return dht; in hpack_dht_alloc() [all …]
|
/dports/net/haproxy20/haproxy-2.0.26/include/common/ |
H A D | hpack-tbl.h | 164 idx = dht->head - idx + dht->wrap; in hpack_get_dte() 231 if (dht->used * 32 + dht->total + needed + 32 <= dht->size) in hpack_dht_make_room() 233 else if (!dht->used) in hpack_dht_make_room() 242 dht->size = size; in hpack_dht_init() 243 dht->total = 0; in hpack_dht_init() 244 dht->used = 0; in hpack_dht_init() 252 dht = malloc(size); in hpack_dht_alloc() 253 if (!dht) in hpack_dht_alloc() 254 return dht; in hpack_dht_alloc() 257 return dht; in hpack_dht_alloc() [all …]
|
/dports/net/haproxy18/haproxy-1.8.30/include/common/ |
H A D | hpack-tbl.h | 164 idx = dht->head - idx + dht->wrap; in hpack_get_dte() 231 if (dht->used * 32 + dht->total + needed + 32 <= dht->size) in hpack_dht_make_room() 233 else if (!dht->used) in hpack_dht_make_room() 242 dht->size = size; in hpack_dht_init() 243 dht->total = 0; in hpack_dht_init() 244 dht->used = 0; in hpack_dht_init() 252 dht = malloc(size); in hpack_dht_alloc() 253 if (!dht) in hpack_dht_alloc() 254 return dht; in hpack_dht_alloc() 257 return dht; in hpack_dht_alloc() [all …]
|
/dports/net/nuster/nuster-5.0.4.21/include/common/ |
H A D | hpack-tbl.h | 153 idx = dht->head - idx + dht->wrap; in hpack_get_dte() 220 if (dht->used * 32 + dht->total + needed + 32 <= dht->size) in hpack_dht_make_room() 222 else if (!dht->used) in hpack_dht_make_room() 231 dht->size = size; in hpack_dht_init() 232 dht->total = 0; in hpack_dht_init() 233 dht->used = 0; in hpack_dht_init() 241 dht = malloc(size); in hpack_dht_alloc() 242 if (!dht) in hpack_dht_alloc() 243 return dht; in hpack_dht_alloc() 246 return dht; in hpack_dht_alloc() [all …]
|
/dports/net-im/tox/c-toxcore-0.2.13/toxcore/ |
H A D | DHT.c | 145 return dht->net; in dht_get_net() 287 …get_shared_key(dht->mono_time, &dht->shared_keys_recv, shared_key, dht->self_secret_key, public_ke… in dht_get_shared_key_recv() 295 …get_shared_key(dht->mono_time, &dht->shared_keys_sent, shared_key, dht->self_secret_key, public_ke… in dht_get_shared_key_sent() 1636 &dht->friends_list[dht->num_friends], in dht_delfriend() 1786 …getnodes(dht, dht->to_bootstrap[i].ip_port, dht->to_bootstrap[i].public_key, dht->self_public_key,… in do_Close() 1792 …dht, &dht->close_lastgetnodes, dht->self_public_key, dht->close_clientlist, LCLIENT_LIST, &dht->cl… in do_Close() 2710 dht->ping = ping_new(mono_time, dht); in new_dht() 2745 return dht; in new_dht() 2765 do_NAT(dht); in do_dht() 2783 free(dht); in kill_dht() [all …]
|
H A D | DHT.h | 211 const uint8_t *dht_get_self_public_key(const DHT *dht); 216 Networking_Core *dht_get_net(const DHT *dht); 217 struct Ping *dht_get_ping(const DHT *dht); 220 uint16_t dht_get_num_friends(const DHT *dht); 331 void do_dht(DHT *dht); 359 int dht_connect_after_load(DHT *dht); 382 uint32_t dht_size(const DHT *dht); 385 void dht_save(const DHT *dht, uint8_t *data); 397 void kill_dht(DHT *dht); 402 bool dht_isconnected(const DHT *dht); [all …]
|
/dports/net-im/dendrite/dendrite-0.5.1/vendor/github.com/libp2p/go-libp2p-kad-dht/dual/ |
H A D | dual.go | 29 WAN *dht.IpfsDHT 30 LAN *dht.IpfsDHT 52 wan, lan []dht.Option 101 dht.QueryFilter(dht.PublicQueryFilter), 102 dht.RoutingTableFilter(dht.PublicRoutingTableFilter), 112 dht.QueryFilter(dht.PrivateQueryFilter), 113 dht.RoutingTableFilter(dht.PrivateRoutingTableFilter), 132 cfg.lan = append(cfg.lan, dht.Mode(dht.ModeServer)) 145 return combineErrors(dht.WAN.Close(), dht.LAN.Close()) 346 p := helper.Parallel{Routers: []routing.Routing{dht.WAN, dht.LAN}, Validator: dht.WAN.Validator} [all …]
|
/dports/net-p2p/libktorrent/libktorrent-21.12.3/src/dht/tests/ |
H A D | keytest.cpp | 45 return dht::Key(result); in KeyFromHexString() 63 dht::Key a = KeyFromHexString("14455"); in testAddition() 64 dht::Key b = KeyFromHexString("FFEEDD"); in testAddition() 65 dht::Key c = a + b; in testAddition() 68 dht::Key d = a + 1; in testAddition() 79 dht::Key g = j + h; in testAddition() 87 dht::Key c = a - b; in testSubtraction() 92 dht::Key f = d - e; in testSubtraction() 100 dht::Key h = g - j; in testSubtraction() 107 dht::Key b = a / 2; in testDivision() [all …]
|