Symbol: fwd
bin/ksh/history.c
488
findhist(int start, int fwd, const char *str, int anchored)
bin/ksh/history.c
492
int incr = fwd ? 1 : -1;
bin/ksh/vi.c
1704
grabsearch(int save, int start, int fwd, char *pat)
bin/ksh/vi.c
1710
if ((start == 0 && fwd == 0) || (start >= hlast-1 && fwd == 1))
bin/ksh/vi.c
1712
if (fwd)
bin/ksh/vi.c
1717
if ((hist = findhist(start, fwd, pat, anchored)) < 0) {
bin/ksh/vi.c
1720
if (start != 0 && fwd && strcmp(holdbuf, pat) >= 0) {
sbin/unwind/libunbound/iterator/iter_fwd.c
100
forwards_delete(struct iter_forwards* fwd)
sbin/unwind/libunbound/iterator/iter_fwd.c
102
if(!fwd)
sbin/unwind/libunbound/iterator/iter_fwd.c
104
lock_rw_destroy(&fwd->lock);
sbin/unwind/libunbound/iterator/iter_fwd.c
105
fwd_del_tree(fwd);
sbin/unwind/libunbound/iterator/iter_fwd.c
106
free(fwd);
sbin/unwind/libunbound/iterator/iter_fwd.c
111
forwards_insert_data(struct iter_forwards* fwd, uint16_t c, uint8_t* nm,
sbin/unwind/libunbound/iterator/iter_fwd.c
131
if(!rbtree_insert(fwd->tree, &node->node)) {
sbin/unwind/libunbound/iterator/iter_fwd.c
143
fwd_zone_find(struct iter_forwards* fwd, uint16_t c, uint8_t* nm)
sbin/unwind/libunbound/iterator/iter_fwd.c
150
return (struct iter_forward_zone*)rbtree_search(fwd->tree, &key);
sbin/unwind/libunbound/iterator/iter_fwd.c
155
forwards_insert(struct iter_forwards* fwd, uint16_t c, struct delegpt* dp)
sbin/unwind/libunbound/iterator/iter_fwd.c
157
return forwards_insert_data(fwd, c, dp->name, dp->namelen,
sbin/unwind/libunbound/iterator/iter_fwd.c
163
fwd_init_parents(struct iter_forwards* fwd)
sbin/unwind/libunbound/iterator/iter_fwd.c
167
RBTREE_FOR(node, struct iter_forward_zone*, fwd->tree) {
sbin/unwind/libunbound/iterator/iter_fwd.c
277
read_forwards(struct iter_forwards* fwd, struct config_file* cfg)
sbin/unwind/libunbound/iterator/iter_fwd.c
302
if(!forwards_insert(fwd, LDNS_RR_CLASS_IN, dp))
sbin/unwind/libunbound/iterator/iter_fwd.c
310
fwd_add_stub_hole(struct iter_forwards* fwd, uint16_t c, uint8_t* nm)
sbin/unwind/libunbound/iterator/iter_fwd.c
317
return forwards_insert_data(fwd, key.dclass, key.name,
sbin/unwind/libunbound/iterator/iter_fwd.c
323
make_stub_holes(struct iter_forwards* fwd, struct config_file* cfg)
sbin/unwind/libunbound/iterator/iter_fwd.c
335
if(fwd_zone_find(fwd, LDNS_RR_CLASS_IN, dname) != NULL) {
sbin/unwind/libunbound/iterator/iter_fwd.c
340
if(!fwd_add_stub_hole(fwd, LDNS_RR_CLASS_IN, dname)) {
sbin/unwind/libunbound/iterator/iter_fwd.c
352
make_auth_holes(struct iter_forwards* fwd, struct config_file* cfg)
sbin/unwind/libunbound/iterator/iter_fwd.c
364
if(fwd_zone_find(fwd, LDNS_RR_CLASS_IN, dname) != NULL) {
sbin/unwind/libunbound/iterator/iter_fwd.c
369
if(!fwd_add_stub_hole(fwd, LDNS_RR_CLASS_IN, dname)) {
sbin/unwind/libunbound/iterator/iter_fwd.c
380
forwards_apply_cfg(struct iter_forwards* fwd, struct config_file* cfg)
sbin/unwind/libunbound/iterator/iter_fwd.c
382
if(fwd->tree) {
sbin/unwind/libunbound/iterator/iter_fwd.c
383
lock_unprotect(&fwd->lock, fwd->tree);
sbin/unwind/libunbound/iterator/iter_fwd.c
385
fwd_del_tree(fwd);
sbin/unwind/libunbound/iterator/iter_fwd.c
386
fwd->tree = rbtree_create(fwd_cmp);
sbin/unwind/libunbound/iterator/iter_fwd.c
387
if(!fwd->tree)
sbin/unwind/libunbound/iterator/iter_fwd.c
389
lock_protect(&fwd->lock, fwd->tree, sizeof(*fwd->tree));
sbin/unwind/libunbound/iterator/iter_fwd.c
391
lock_rw_wrlock(&fwd->lock);
sbin/unwind/libunbound/iterator/iter_fwd.c
393
if(!read_forwards(fwd, cfg)) {
sbin/unwind/libunbound/iterator/iter_fwd.c
394
lock_rw_unlock(&fwd->lock);
sbin/unwind/libunbound/iterator/iter_fwd.c
397
if(!make_stub_holes(fwd, cfg)) {
sbin/unwind/libunbound/iterator/iter_fwd.c
398
lock_rw_unlock(&fwd->lock);
sbin/unwind/libunbound/iterator/iter_fwd.c
407
if(!make_auth_holes(fwd, cfg)) {
sbin/unwind/libunbound/iterator/iter_fwd.c
408
lock_rw_unlock(&fwd->lock);
sbin/unwind/libunbound/iterator/iter_fwd.c
411
fwd_init_parents(fwd);
sbin/unwind/libunbound/iterator/iter_fwd.c
412
lock_rw_unlock(&fwd->lock);
sbin/unwind/libunbound/iterator/iter_fwd.c
417
forwards_find(struct iter_forwards* fwd, uint8_t* qname, uint16_t qclass,
sbin/unwind/libunbound/iterator/iter_fwd.c
428
if(!nolock) { lock_rw_rdlock(&fwd->lock); }
sbin/unwind/libunbound/iterator/iter_fwd.c
429
res = (struct iter_forward_zone*)rbtree_search(fwd->tree, &key);
sbin/unwind/libunbound/iterator/iter_fwd.c
431
if(!has_dp && !nolock) { lock_rw_unlock(&fwd->lock); }
sbin/unwind/libunbound/iterator/iter_fwd.c
436
forwards_lookup(struct iter_forwards* fwd, uint8_t* qname, uint16_t qclass,
sbin/unwind/libunbound/iterator/iter_fwd.c
449
if(!nolock) { lock_rw_rdlock(&fwd->lock); }
sbin/unwind/libunbound/iterator/iter_fwd.c
450
if(rbtree_find_less_equal(fwd->tree, &key, &res)) {
sbin/unwind/libunbound/iterator/iter_fwd.c
458
if(!nolock) { lock_rw_unlock(&fwd->lock); }
sbin/unwind/libunbound/iterator/iter_fwd.c
471
if(!has_dp && !nolock) { lock_rw_unlock(&fwd->lock); }
sbin/unwind/libunbound/iterator/iter_fwd.c
476
forwards_lookup_root(struct iter_forwards* fwd, uint16_t qclass, int nolock)
sbin/unwind/libunbound/iterator/iter_fwd.c
479
return forwards_lookup(fwd, &root, qclass, nolock);
sbin/unwind/libunbound/iterator/iter_fwd.c
485
next_root_locked(struct iter_forwards* fwd, uint16_t* dclass)
sbin/unwind/libunbound/iterator/iter_fwd.c
492
n = rbtree_first(fwd->tree);
sbin/unwind/libunbound/iterator/iter_fwd.c
502
return next_root_locked(fwd, dclass);
sbin/unwind/libunbound/iterator/iter_fwd.c
513
if(rbtree_find_less_equal(fwd->tree, &key, &n)) {
sbin/unwind/libunbound/iterator/iter_fwd.c
530
return next_root_locked(fwd, dclass);
sbin/unwind/libunbound/iterator/iter_fwd.c
535
forwards_next_root(struct iter_forwards* fwd, uint16_t* dclass, int nolock)
sbin/unwind/libunbound/iterator/iter_fwd.c
539
if(!nolock) { lock_rw_rdlock(&fwd->lock); }
sbin/unwind/libunbound/iterator/iter_fwd.c
540
ret = next_root_locked(fwd, dclass);
sbin/unwind/libunbound/iterator/iter_fwd.c
541
if(!nolock) { lock_rw_unlock(&fwd->lock); }
sbin/unwind/libunbound/iterator/iter_fwd.c
546
forwards_get_mem(struct iter_forwards* fwd)
sbin/unwind/libunbound/iterator/iter_fwd.c
550
if(!fwd)
sbin/unwind/libunbound/iterator/iter_fwd.c
552
lock_rw_rdlock(&fwd->lock);
sbin/unwind/libunbound/iterator/iter_fwd.c
553
s = sizeof(*fwd) + sizeof(*fwd->tree);
sbin/unwind/libunbound/iterator/iter_fwd.c
554
RBTREE_FOR(p, struct iter_forward_zone*, fwd->tree) {
sbin/unwind/libunbound/iterator/iter_fwd.c
557
lock_rw_unlock(&fwd->lock);
sbin/unwind/libunbound/iterator/iter_fwd.c
562
forwards_add_zone(struct iter_forwards* fwd, uint16_t c, struct delegpt* dp,
sbin/unwind/libunbound/iterator/iter_fwd.c
567
if(!nolock) { lock_rw_wrlock(&fwd->lock); }
sbin/unwind/libunbound/iterator/iter_fwd.c
568
if((z=fwd_zone_find(fwd, c, dp->name)) != NULL) {
sbin/unwind/libunbound/iterator/iter_fwd.c
569
(void)rbtree_delete(fwd->tree, &z->node);
sbin/unwind/libunbound/iterator/iter_fwd.c
572
if(!forwards_insert(fwd, c, dp)) {
sbin/unwind/libunbound/iterator/iter_fwd.c
573
if(!nolock) { lock_rw_unlock(&fwd->lock); }
sbin/unwind/libunbound/iterator/iter_fwd.c
576
fwd_init_parents(fwd);
sbin/unwind/libunbound/iterator/iter_fwd.c
577
if(!nolock) { lock_rw_unlock(&fwd->lock); }
sbin/unwind/libunbound/iterator/iter_fwd.c
582
forwards_delete_zone(struct iter_forwards* fwd, uint16_t c, uint8_t* nm,
sbin/unwind/libunbound/iterator/iter_fwd.c
587
if(!nolock) { lock_rw_wrlock(&fwd->lock); }
sbin/unwind/libunbound/iterator/iter_fwd.c
588
if(!(z=fwd_zone_find(fwd, c, nm))) {
sbin/unwind/libunbound/iterator/iter_fwd.c
589
if(!nolock) { lock_rw_unlock(&fwd->lock); }
sbin/unwind/libunbound/iterator/iter_fwd.c
592
(void)rbtree_delete(fwd->tree, &z->node);
sbin/unwind/libunbound/iterator/iter_fwd.c
594
fwd_init_parents(fwd);
sbin/unwind/libunbound/iterator/iter_fwd.c
595
if(!nolock) { lock_rw_unlock(&fwd->lock); }
sbin/unwind/libunbound/iterator/iter_fwd.c
599
forwards_add_stub_hole(struct iter_forwards* fwd, uint16_t c, uint8_t* nm,
sbin/unwind/libunbound/iterator/iter_fwd.c
603
if(!nolock) { lock_rw_wrlock(&fwd->lock); }
sbin/unwind/libunbound/iterator/iter_fwd.c
604
if(fwd_zone_find(fwd, c, nm) != NULL) {
sbin/unwind/libunbound/iterator/iter_fwd.c
605
if(!nolock) { lock_rw_unlock(&fwd->lock); }
sbin/unwind/libunbound/iterator/iter_fwd.c
608
if(!fwd_add_stub_hole(fwd, c, nm)) {
sbin/unwind/libunbound/iterator/iter_fwd.c
609
if(!nolock) { lock_rw_unlock(&fwd->lock); }
sbin/unwind/libunbound/iterator/iter_fwd.c
612
fwd_init_parents(fwd);
sbin/unwind/libunbound/iterator/iter_fwd.c
613
if(!nolock) { lock_rw_unlock(&fwd->lock); }
sbin/unwind/libunbound/iterator/iter_fwd.c
618
forwards_delete_stub_hole(struct iter_forwards* fwd, uint16_t c,
sbin/unwind/libunbound/iterator/iter_fwd.c
623
if(!nolock) { lock_rw_wrlock(&fwd->lock); }
sbin/unwind/libunbound/iterator/iter_fwd.c
624
if(!(z=fwd_zone_find(fwd, c, nm))) {
sbin/unwind/libunbound/iterator/iter_fwd.c
625
if(!nolock) { lock_rw_unlock(&fwd->lock); }
sbin/unwind/libunbound/iterator/iter_fwd.c
629
if(!nolock) { lock_rw_unlock(&fwd->lock); }
sbin/unwind/libunbound/iterator/iter_fwd.c
632
(void)rbtree_delete(fwd->tree, &z->node);
sbin/unwind/libunbound/iterator/iter_fwd.c
634
fwd_init_parents(fwd);
sbin/unwind/libunbound/iterator/iter_fwd.c
635
if(!nolock) { lock_rw_unlock(&fwd->lock); }
sbin/unwind/libunbound/iterator/iter_fwd.c
639
forwards_swap_tree(struct iter_forwards* fwd, struct iter_forwards* data)
sbin/unwind/libunbound/iterator/iter_fwd.c
641
rbtree_type* oldtree = fwd->tree;
sbin/unwind/libunbound/iterator/iter_fwd.c
643
lock_unprotect(&fwd->lock, oldtree);
sbin/unwind/libunbound/iterator/iter_fwd.c
648
fwd->tree = data->tree;
sbin/unwind/libunbound/iterator/iter_fwd.c
650
lock_protect(&fwd->lock, fwd->tree, sizeof(*fwd->tree));
sbin/unwind/libunbound/iterator/iter_fwd.c
70
struct iter_forwards* fwd = (struct iter_forwards*)calloc(1,
sbin/unwind/libunbound/iterator/iter_fwd.c
72
if(!fwd)
sbin/unwind/libunbound/iterator/iter_fwd.c
74
lock_rw_init(&fwd->lock);
sbin/unwind/libunbound/iterator/iter_fwd.c
75
return fwd;
sbin/unwind/libunbound/iterator/iter_fwd.c
92
static void fwd_del_tree(struct iter_forwards* fwd)
sbin/unwind/libunbound/iterator/iter_fwd.c
94
if(fwd->tree)
sbin/unwind/libunbound/iterator/iter_fwd.c
95
traverse_postorder(fwd->tree, &delfwdnode, NULL);
sbin/unwind/libunbound/iterator/iter_fwd.c
96
free(fwd->tree);
sbin/unwind/libunbound/iterator/iter_fwd.h
103
void forwards_delete(struct iter_forwards* fwd);
sbin/unwind/libunbound/iterator/iter_fwd.h
111
int forwards_apply_cfg(struct iter_forwards* fwd, struct config_file* cfg);
sbin/unwind/libunbound/iterator/iter_fwd.h
126
struct delegpt* forwards_find(struct iter_forwards* fwd, uint8_t* qname,
sbin/unwind/libunbound/iterator/iter_fwd.h
146
struct delegpt* forwards_lookup(struct iter_forwards* fwd,
sbin/unwind/libunbound/iterator/iter_fwd.h
156
struct delegpt* forwards_lookup_root(struct iter_forwards* fwd,
sbin/unwind/libunbound/iterator/iter_fwd.h
168
int forwards_next_root(struct iter_forwards* fwd, uint16_t* qclass,
sbin/unwind/libunbound/iterator/iter_fwd.h
177
size_t forwards_get_mem(struct iter_forwards* fwd);
sbin/unwind/libunbound/iterator/iter_fwd.h
194
int forwards_add_zone(struct iter_forwards* fwd, uint16_t c,
sbin/unwind/libunbound/iterator/iter_fwd.h
207
void forwards_delete_zone(struct iter_forwards* fwd, uint16_t c,
sbin/unwind/libunbound/iterator/iter_fwd.h
222
int forwards_add_stub_hole(struct iter_forwards* fwd, uint16_t c,
sbin/unwind/libunbound/iterator/iter_fwd.h
234
void forwards_delete_stub_hole(struct iter_forwards* fwd, uint16_t c,
sbin/unwind/libunbound/iterator/iter_fwd.h
244
void forwards_swap_tree(struct iter_forwards* fwd, struct iter_forwards* data);
sbin/unwind/libunbound/iterator/iter_utils.c
1328
iter_get_next_root(struct iter_hints* hints, struct iter_forwards* fwd,
sbin/unwind/libunbound/iterator/iter_utils.c
1336
lock_rw_rdlock(&fwd->lock);
sbin/unwind/libunbound/iterator/iter_utils.c
1339
r2 = forwards_next_root(fwd, &c2, nolock);
sbin/unwind/libunbound/iterator/iter_utils.c
1340
lock_rw_unlock(&fwd->lock);
sbin/unwind/libunbound/iterator/iter_utils.h
346
int iter_get_next_root(struct iter_hints* hints, struct iter_forwards* fwd,
sbin/unwind/resolver.c
1515
char fwd[FWD_MAX];
sbin/unwind/resolver.c
1519
ret = snprintf(fwd, sizeof(fwd), "%s@%d#%s",
sbin/unwind/resolver.c
1523
ret = snprintf(fwd, sizeof(fwd), "%s@%d",
sbin/unwind/resolver.c
1527
if (ret < 0 || (size_t)ret >= sizeof(fwd)) {
sbin/unwind/resolver.c
1532
ub_ctx_set_fwd(res->ctx, fwd);
sys/arch/arm64/dev/aplnco.c
117
aplnco_lfsr(uint16_t fwd)
sys/arch/arm64/dev/aplnco.c
127
if (i == fwd)
sys/dev/ic/advlib.h
621
u_int8_t fwd;
sys/dev/ic/advlib.h
653
u_int8_t fwd;
sys/netinet/ip_output.c
578
u_int rtableid, int fwd)
sys/netinet/ip_output.c
593
pf_test(AF_INET, fwd ? PF_FWD : PF_OUT, encif, &m) != PF_PASS) {
sys/netinet6/ip6_output.c
2830
u_int rtableid, int tunalready, int fwd)
sys/netinet6/ip6_output.c
2845
pf_test(AF_INET6, fwd ? PF_FWD : PF_OUT, encif, &m) != PF_PASS) {
usr.bin/ctfconv/parse.c
260
it_merge(struct itype *fwd, struct itype *it)
usr.bin/ctfconv/parse.c
262
assert(fwd->it_flags & ITF_FORWARD);
usr.bin/ctfconv/parse.c
263
assert(fwd->it_type == it->it_type);
usr.bin/ctfconv/parse.c
264
assert(TAILQ_EMPTY(&fwd->it_members));
usr.bin/ctfconv/parse.c
267
fwd->it_off = it->it_off;
usr.bin/ctfconv/parse.c
268
fwd->it_ref = it->it_ref;
usr.bin/ctfconv/parse.c
269
fwd->it_refp = it->it_refp;
usr.bin/ctfconv/parse.c
270
fwd->it_size = it->it_size;
usr.bin/ctfconv/parse.c
271
fwd->it_nelems = it->it_nelems;
usr.bin/ctfconv/parse.c
272
fwd->it_enc = it->it_enc;
usr.bin/ctfconv/parse.c
273
fwd->it_flags = it->it_flags;
usr.bin/ctfconv/parse.c
275
TAILQ_CONCAT(&fwd->it_members, &it->it_members, im_next);
usr.bin/lex/ecs.c
119
mkeccl(u_char *ccls, int lenccl, int *fwd, int *bck, int llsiz, int NUL_mapping)
usr.bin/lex/ecs.c
143
for (i = fwd[cclm]; i != NIL && i <= llsiz; i = fwd[i]) {
usr.bin/lex/ecs.c
165
fwd[newec] = i;
usr.bin/lex/ecs.c
184
fwd[oldec] = i;
usr.bin/lex/ecs.c
193
fwd[oldec] = NIL;
usr.bin/lex/ecs.c
195
fwd[newec] = NIL;
usr.bin/lex/ecs.c
210
mkechar(int tch, int *fwd, int *bck)
usr.bin/lex/ecs.c
217
if (fwd[tch] != NIL)
usr.bin/lex/ecs.c
218
bck[fwd[tch]] = bck[tch];
usr.bin/lex/ecs.c
221
fwd[bck[tch]] = fwd[tch];
usr.bin/lex/ecs.c
223
fwd[tch] = NIL;
usr.bin/lex/ecs.c
82
cre8ecs(int *fwd, int *bck, int num)
usr.bin/lex/ecs.c
96
for (j = fwd[i]; j != NIL; j = fwd[j])
usr.bin/ssh/channels.c
3836
struct Forward *fwd, int *allocated_listen_port,
usr.bin/ssh/channels.c
3848
if (is_client && fwd->connect_path != NULL) {
usr.bin/ssh/channels.c
3849
host = fwd->connect_path;
usr.bin/ssh/channels.c
3852
fwd->listen_host : fwd->connect_host;
usr.bin/ssh/channels.c
3864
addr = channel_fwd_bind_addr(ssh, fwd->listen_host, &wildcard,
usr.bin/ssh/channels.c
3877
snprintf(strport, sizeof strport, "%d", fwd->listen_port);
usr.bin/ssh/channels.c
3909
fwd->listen_port == 0 && allocated_listen_port != NULL &&
usr.bin/ssh/channels.c
3957
fwd->listen_port == 0 &&
usr.bin/ssh/channels.c
3970
c->host_port = fwd->connect_port;
usr.bin/ssh/channels.c
3972
if (fwd->listen_port == 0 && allocated_listen_port != NULL &&
usr.bin/ssh/channels.c
3976
c->listening_port = fwd->listen_port;
usr.bin/ssh/channels.c
3980
error_f("cannot listen to port: %d", fwd->listen_port);
usr.bin/ssh/channels.c
3987
struct Forward *fwd, struct ForwardOptions *fwd_opts)
usr.bin/ssh/channels.c
3997
if (fwd->connect_path != NULL) {
usr.bin/ssh/channels.c
3998
if (strlen(fwd->connect_path) > sizeof(sunaddr.sun_path)) {
usr.bin/ssh/channels.c
4000
fwd->connect_path);
usr.bin/ssh/channels.c
4003
path = fwd->connect_path;
usr.bin/ssh/channels.c
4006
if (fwd->connect_host == NULL) {
usr.bin/ssh/channels.c
4010
if (strlen(fwd->connect_host) >= NI_MAXHOST) {
usr.bin/ssh/channels.c
4014
path = fwd->connect_host;
usr.bin/ssh/channels.c
4015
port = fwd->connect_port;
usr.bin/ssh/channels.c
4019
path = fwd->listen_path;
usr.bin/ssh/channels.c
4027
if (fwd->listen_path == NULL) {
usr.bin/ssh/channels.c
4031
if (strlen(fwd->listen_path) > sizeof(sunaddr.sun_path)) {
usr.bin/ssh/channels.c
4032
error("Local listening path too long: %s", fwd->listen_path);
usr.bin/ssh/channels.c
4036
debug3_f("type %d path %s", type, fwd->listen_path);
usr.bin/ssh/channels.c
4040
sock = unix_listener(fwd->listen_path, SSH_LISTEN_BACKLOG,
usr.bin/ssh/channels.c
4046
debug("Local forwarding listening on path %s.", fwd->listen_path);
usr.bin/ssh/channels.c
4055
c->listening_addr = xstrdup(fwd->listen_path);
usr.bin/ssh/channels.c
4103
channel_cancel_rport_listener(struct ssh *ssh, struct Forward *fwd)
usr.bin/ssh/channels.c
4105
if (fwd->listen_path != NULL) {
usr.bin/ssh/channels.c
4107
fwd->listen_path);
usr.bin/ssh/channels.c
4110
fwd->listen_host, fwd->listen_port);
usr.bin/ssh/channels.c
4179
struct Forward *fwd, int cport, struct ForwardOptions *fwd_opts)
usr.bin/ssh/channels.c
4181
if (fwd->listen_path != NULL) {
usr.bin/ssh/channels.c
4183
fwd->listen_path);
usr.bin/ssh/channels.c
4186
fwd->listen_host, fwd->listen_port, cport, fwd_opts);
usr.bin/ssh/channels.c
4193
struct Forward *fwd, struct ForwardOptions *fwd_opts)
usr.bin/ssh/channels.c
4195
if (fwd->listen_path != NULL) {
usr.bin/ssh/channels.c
4197
SSH_CHANNEL_UNIX_LISTENER, fwd, fwd_opts);
usr.bin/ssh/channels.c
4200
SSH_CHANNEL_PORT_LISTENER, fwd, NULL, fwd_opts);
usr.bin/ssh/channels.c
4206
remote_open_match(struct permission *allowed_open, struct Forward *fwd)
usr.bin/ssh/channels.c
4212
if (fwd->listen_path != NULL)
usr.bin/ssh/channels.c
4215
if (fwd->listen_host == NULL || allowed_open->listen_host == NULL)
usr.bin/ssh/channels.c
4219
allowed_open->listen_port != fwd->listen_port)
usr.bin/ssh/channels.c
4223
lhost = xstrdup(fwd->listen_host);
usr.bin/ssh/channels.c
4233
check_rfwd_permission(struct ssh *ssh, struct Forward *fwd)
usr.bin/ssh/channels.c
4246
if (remote_open_match(perm, fwd)) {
usr.bin/ssh/channels.c
4257
if (remote_open_match(perm, fwd)) {
usr.bin/ssh/channels.c
4269
channel_setup_remote_fwd_listener(struct ssh *ssh, struct Forward *fwd,
usr.bin/ssh/channels.c
4272
if (!check_rfwd_permission(ssh, fwd)) {
usr.bin/ssh/channels.c
4274
if (fwd->listen_path != NULL)
usr.bin/ssh/channels.c
4280
fwd->listen_path);
usr.bin/ssh/channels.c
4281
else if(fwd->listen_host != NULL)
usr.bin/ssh/channels.c
4286
fwd->listen_host, fwd->listen_port );
usr.bin/ssh/channels.c
4293
if (fwd->listen_path != NULL) {
usr.bin/ssh/channels.c
4295
SSH_CHANNEL_RUNIX_LISTENER, fwd, fwd_opts);
usr.bin/ssh/channels.c
4298
SSH_CHANNEL_RPORT_LISTENER, fwd, allocated_listen_port,
usr.bin/ssh/channels.c
4325
channel_request_remote_forwarding(struct ssh *ssh, struct Forward *fwd)
usr.bin/ssh/channels.c
4332
if (fwd->listen_path != NULL) {
usr.bin/ssh/channels.c
4337
(r = sshpkt_put_cstring(ssh, fwd->listen_path)) != 0 ||
usr.bin/ssh/channels.c
4346
channel_rfwd_bind_host(fwd->listen_host))) != 0 ||
usr.bin/ssh/channels.c
4347
(r = sshpkt_put_u32(ssh, fwd->listen_port)) != 0 ||
usr.bin/ssh/channels.c
4358
if (fwd->connect_path != NULL) {
usr.bin/ssh/channels.c
4359
host_to_connect = fwd->connect_path;
usr.bin/ssh/channels.c
4362
host_to_connect = fwd->connect_host;
usr.bin/ssh/channels.c
4363
port_to_connect = fwd->connect_port;
usr.bin/ssh/channels.c
4365
if (fwd->listen_path != NULL) {
usr.bin/ssh/channels.c
4366
listen_path = fwd->listen_path;
usr.bin/ssh/channels.c
4369
listen_host = fwd->listen_host;
usr.bin/ssh/channels.c
4370
listen_port = fwd->listen_port;
usr.bin/ssh/channels.c
4513
channel_request_rforward_cancel(struct ssh *ssh, struct Forward *fwd)
usr.bin/ssh/channels.c
4515
if (fwd->listen_path != NULL) {
usr.bin/ssh/channels.c
4517
fwd->listen_path);
usr.bin/ssh/channels.c
4520
fwd->listen_host,
usr.bin/ssh/channels.c
4521
fwd->listen_port ? fwd->listen_port : fwd->allocated_port);
usr.bin/ssh/clientloop.c
1047
if (!parse_forward(&fwd, s, 1, 0)) {
usr.bin/ssh/clientloop.c
1052
ok = channel_request_rforward_cancel(ssh, &fwd) == 0;
usr.bin/ssh/clientloop.c
1054
ok = channel_cancel_lport_listener(ssh, &fwd,
usr.bin/ssh/clientloop.c
1057
ok = channel_cancel_lport_listener(ssh, &fwd,
usr.bin/ssh/clientloop.c
1068
if (!parse_forward(&fwd, s, 0, remote) &&
usr.bin/ssh/clientloop.c
1069
!parse_forward(&fwd, s, 1, remote)) {
usr.bin/ssh/clientloop.c
1073
} else if (!parse_forward(&fwd, s, dynamic, remote)) {
usr.bin/ssh/clientloop.c
1078
if (!channel_setup_local_fwd_listener(ssh, &fwd,
usr.bin/ssh/clientloop.c
1084
if (channel_request_remote_forwarding(ssh, &fwd) < 0) {
usr.bin/ssh/clientloop.c
1096
free(fwd.listen_host);
usr.bin/ssh/clientloop.c
1097
free(fwd.listen_path);
usr.bin/ssh/clientloop.c
1098
free(fwd.connect_host);
usr.bin/ssh/clientloop.c
1099
free(fwd.connect_path);
usr.bin/ssh/clientloop.c
983
struct Forward fwd;
usr.bin/ssh/clientloop.c
985
memset(&fwd, 0, sizeof(fwd));
usr.bin/ssh/mux.c
1856
mux_client_forward(int fd, int cancel_flag, u_int ftype, struct Forward *fwd)
usr.bin/ssh/mux.c
1864
fwd_desc = format_forward(ftype, fwd);
usr.bin/ssh/mux.c
1870
if (fwd->listen_path != NULL)
usr.bin/ssh/mux.c
1871
lhost = fwd->listen_path;
usr.bin/ssh/mux.c
1872
else if (fwd->listen_host == NULL)
usr.bin/ssh/mux.c
1874
else if (*fwd->listen_host == '\0')
usr.bin/ssh/mux.c
1877
lhost = fwd->listen_host;
usr.bin/ssh/mux.c
1879
if (fwd->connect_path != NULL)
usr.bin/ssh/mux.c
1880
chost = fwd->connect_path;
usr.bin/ssh/mux.c
1881
else if (fwd->connect_host == NULL)
usr.bin/ssh/mux.c
1884
chost = fwd->connect_host;
usr.bin/ssh/mux.c
1892
(r = sshbuf_put_u32(m, fwd->listen_port)) != 0 ||
usr.bin/ssh/mux.c
1894
(r = sshbuf_put_u32(m, fwd->connect_port)) != 0)
usr.bin/ssh/mux.c
1921
if ((r = sshbuf_get_u32(m, &fwd->allocated_port)) != 0)
usr.bin/ssh/mux.c
1924
fwd->allocated_port,
usr.bin/ssh/mux.c
1925
fwd->connect_host ? fwd->connect_host : "",
usr.bin/ssh/mux.c
1926
fwd->connect_port);
usr.bin/ssh/mux.c
1928
fprintf(stdout, "%i\n", fwd->allocated_port);
usr.bin/ssh/mux.c
562
format_forward(u_int ftype, struct Forward *fwd)
usr.bin/ssh/mux.c
569
(fwd->listen_path != NULL) ? fwd->listen_path :
usr.bin/ssh/mux.c
570
(fwd->listen_host == NULL) ?
usr.bin/ssh/mux.c
572
fwd->listen_host, fwd->listen_port,
usr.bin/ssh/mux.c
573
(fwd->connect_path != NULL) ? fwd->connect_path :
usr.bin/ssh/mux.c
574
fwd->connect_host, fwd->connect_port);
usr.bin/ssh/mux.c
578
(fwd->listen_host == NULL) ?
usr.bin/ssh/mux.c
580
fwd->listen_host, fwd->listen_port);
usr.bin/ssh/mux.c
584
(fwd->listen_path != NULL) ? fwd->listen_path :
usr.bin/ssh/mux.c
585
(fwd->listen_host == NULL) ?
usr.bin/ssh/mux.c
586
"LOCALHOST" : fwd->listen_host,
usr.bin/ssh/mux.c
587
fwd->listen_port,
usr.bin/ssh/mux.c
588
(fwd->connect_path != NULL) ? fwd->connect_path :
usr.bin/ssh/mux.c
589
fwd->connect_host, fwd->connect_port);
usr.bin/ssh/mux.c
719
struct Forward fwd;
usr.bin/ssh/mux.c
726
memset(&fwd, 0, sizeof(fwd));
usr.bin/ssh/mux.c
749
memset(&fwd, 0, sizeof(fwd));
usr.bin/ssh/mux.c
750
fwd.listen_port = lport;
usr.bin/ssh/mux.c
751
if (fwd.listen_port == PORT_STREAMLOCAL)
usr.bin/ssh/mux.c
752
fwd.listen_path = listen_addr;
usr.bin/ssh/mux.c
754
fwd.listen_host = listen_addr;
usr.bin/ssh/mux.c
755
fwd.connect_port = cport;
usr.bin/ssh/mux.c
756
if (fwd.connect_port == PORT_STREAMLOCAL)
usr.bin/ssh/mux.c
757
fwd.connect_path = connect_addr;
usr.bin/ssh/mux.c
759
fwd.connect_host = connect_addr;
usr.bin/ssh/mux.c
762
(fwd_desc = format_forward(ftype, &fwd)));
usr.bin/ssh/mux.c
774
if (ftype == MUX_FWD_DYNAMIC && fwd.listen_path) {
usr.bin/ssh/mux.c
779
if (fwd.listen_port != PORT_STREAMLOCAL && fwd.listen_port >= 65536) {
usr.bin/ssh/mux.c
780
logit_f("invalid listen port %u", fwd.listen_port);
usr.bin/ssh/mux.c
783
if ((fwd.connect_port != PORT_STREAMLOCAL &&
usr.bin/ssh/mux.c
784
fwd.connect_port >= 65536) ||
usr.bin/ssh/mux.c
786
fwd.connect_port == 0)) {
usr.bin/ssh/mux.c
788
fwd.connect_port);
usr.bin/ssh/mux.c
791
if (ftype != MUX_FWD_DYNAMIC && fwd.connect_host == NULL &&
usr.bin/ssh/mux.c
792
fwd.connect_path == NULL) {
usr.bin/ssh/mux.c
802
if (compare_forward(&fwd,
usr.bin/ssh/mux.c
813
if (!compare_forward(&fwd, options.remote_forwards + i))
usr.bin/ssh/mux.c
815
if (fwd.listen_port != 0)
usr.bin/ssh/mux.c
840
if (!channel_setup_local_fwd_listener(ssh, &fwd,
usr.bin/ssh/mux.c
848
add_local_forward(&options, &fwd);
usr.bin/ssh/mux.c
853
fwd.handle = channel_request_remote_forwarding(ssh, &fwd);
usr.bin/ssh/mux.c
854
if (fwd.handle < 0)
usr.bin/ssh/mux.c
856
add_remote_forward(&options, &fwd);
usr.bin/ssh/mux.c
872
free(fwd.listen_host);
usr.bin/ssh/mux.c
873
free(fwd.listen_path);
usr.bin/ssh/mux.c
874
free(fwd.connect_host);
usr.bin/ssh/mux.c
875
free(fwd.connect_path);
usr.bin/ssh/mux.c
884
struct Forward fwd, *found_fwd;
usr.bin/ssh/mux.c
892
memset(&fwd, 0, sizeof(fwd));
usr.bin/ssh/mux.c
915
memset(&fwd, 0, sizeof(fwd));
usr.bin/ssh/mux.c
916
fwd.listen_port = lport;
usr.bin/ssh/mux.c
917
if (fwd.listen_port == PORT_STREAMLOCAL)
usr.bin/ssh/mux.c
918
fwd.listen_path = listen_addr;
usr.bin/ssh/mux.c
920
fwd.listen_host = listen_addr;
usr.bin/ssh/mux.c
921
fwd.connect_port = cport;
usr.bin/ssh/mux.c
922
if (fwd.connect_port == PORT_STREAMLOCAL)
usr.bin/ssh/mux.c
923
fwd.connect_path = connect_addr;
usr.bin/ssh/mux.c
925
fwd.connect_host = connect_addr;
usr.bin/ssh/mux.c
928
(fwd_desc = format_forward(ftype, &fwd)));
usr.bin/ssh/mux.c
936
if (compare_forward(&fwd,
usr.bin/ssh/mux.c
945
if (compare_forward(&fwd,
usr.bin/ssh/mux.c
967
if (channel_cancel_lport_listener(ssh, &fwd, fwd.connect_port,
usr.bin/ssh/readconf.c
1136
struct Forward fwd;
usr.bin/ssh/readconf.c
1741
if (parse_forward(&fwd, fwdarg, dynamicfwd, remotefwd) == 0) {
usr.bin/ssh/readconf.c
1749
add_remote_forward(options, &fwd);
usr.bin/ssh/readconf.c
1751
add_local_forward(options, &fwd);
usr.bin/ssh/readconf.c
3202
parse_fwd_field(char **p, struct fwdarg *fwd)
usr.bin/ssh/readconf.c
3229
fwd->arg = cp + 1;
usr.bin/ssh/readconf.c
3230
fwd->ispath = ispath;
usr.bin/ssh/readconf.c
3251
fwd->arg = *p;
usr.bin/ssh/readconf.c
3252
fwd->ispath = ispath;
usr.bin/ssh/readconf.c
3268
parse_forward(struct Forward *fwd, const char *fwdspec, int dynamicfwd, int remotefwd)
usr.bin/ssh/readconf.c
3274
memset(fwd, 0, sizeof(*fwd));
usr.bin/ssh/readconf.c
3303
fwd->listen_path = xstrdup(fwdargs[0].arg);
usr.bin/ssh/readconf.c
3304
fwd->listen_port = PORT_STREAMLOCAL;
usr.bin/ssh/readconf.c
3306
fwd->listen_host = NULL;
usr.bin/ssh/readconf.c
3307
fwd->listen_port = a2port(fwdargs[0].arg);
usr.bin/ssh/readconf.c
3309
fwd->connect_host = xstrdup("socks");
usr.bin/ssh/readconf.c
3314
fwd->listen_path = xstrdup(fwdargs[0].arg);
usr.bin/ssh/readconf.c
3315
fwd->listen_port = PORT_STREAMLOCAL;
usr.bin/ssh/readconf.c
3316
fwd->connect_path = xstrdup(fwdargs[1].arg);
usr.bin/ssh/readconf.c
3317
fwd->connect_port = PORT_STREAMLOCAL;
usr.bin/ssh/readconf.c
3319
fwd->listen_host = NULL;
usr.bin/ssh/readconf.c
3320
fwd->listen_port = a2port(fwdargs[0].arg);
usr.bin/ssh/readconf.c
3321
fwd->connect_path = xstrdup(fwdargs[1].arg);
usr.bin/ssh/readconf.c
3322
fwd->connect_port = PORT_STREAMLOCAL;
usr.bin/ssh/readconf.c
3324
fwd->listen_host = xstrdup(fwdargs[0].arg);
usr.bin/ssh/readconf.c
3325
fwd->listen_port = a2port(fwdargs[1].arg);
usr.bin/ssh/readconf.c
3326
fwd->connect_host = xstrdup("socks");
usr.bin/ssh/readconf.c
3332
fwd->listen_path = xstrdup(fwdargs[0].arg);
usr.bin/ssh/readconf.c
3333
fwd->listen_port = PORT_STREAMLOCAL;
usr.bin/ssh/readconf.c
3334
fwd->connect_host = xstrdup(fwdargs[1].arg);
usr.bin/ssh/readconf.c
3335
fwd->connect_port = a2port(fwdargs[2].arg);
usr.bin/ssh/readconf.c
3337
fwd->listen_host = xstrdup(fwdargs[0].arg);
usr.bin/ssh/readconf.c
3338
fwd->listen_port = a2port(fwdargs[1].arg);
usr.bin/ssh/readconf.c
3339
fwd->connect_path = xstrdup(fwdargs[2].arg);
usr.bin/ssh/readconf.c
3340
fwd->connect_port = PORT_STREAMLOCAL;
usr.bin/ssh/readconf.c
3342
fwd->listen_host = NULL;
usr.bin/ssh/readconf.c
3343
fwd->listen_port = a2port(fwdargs[0].arg);
usr.bin/ssh/readconf.c
3344
fwd->connect_host = xstrdup(fwdargs[1].arg);
usr.bin/ssh/readconf.c
3345
fwd->connect_port = a2port(fwdargs[2].arg);
usr.bin/ssh/readconf.c
3350
fwd->listen_host = xstrdup(fwdargs[0].arg);
usr.bin/ssh/readconf.c
3351
fwd->listen_port = a2port(fwdargs[1].arg);
usr.bin/ssh/readconf.c
3352
fwd->connect_host = xstrdup(fwdargs[2].arg);
usr.bin/ssh/readconf.c
3353
fwd->connect_port = a2port(fwdargs[3].arg);
usr.bin/ssh/readconf.c
3366
if (fwd->connect_path == NULL &&
usr.bin/ssh/readconf.c
3367
fwd->listen_path == NULL)
usr.bin/ssh/readconf.c
3370
if (fwd->connect_port <= 0 && fwd->connect_path == NULL)
usr.bin/ssh/readconf.c
3374
if ((fwd->listen_port < 0 && fwd->listen_path == NULL) ||
usr.bin/ssh/readconf.c
3375
(!remotefwd && fwd->listen_port == 0))
usr.bin/ssh/readconf.c
3377
if (fwd->connect_host != NULL &&
usr.bin/ssh/readconf.c
3378
strlen(fwd->connect_host) >= NI_MAXHOST)
usr.bin/ssh/readconf.c
3384
if (fwd->connect_path != NULL &&
usr.bin/ssh/readconf.c
3385
strlen(fwd->connect_path) >= PATH_MAX_SUN)
usr.bin/ssh/readconf.c
3387
if (fwd->listen_host != NULL &&
usr.bin/ssh/readconf.c
3388
strlen(fwd->listen_host) >= NI_MAXHOST)
usr.bin/ssh/readconf.c
3390
if (fwd->listen_path != NULL &&
usr.bin/ssh/readconf.c
3391
strlen(fwd->listen_path) >= PATH_MAX_SUN)
usr.bin/ssh/readconf.c
3397
free(fwd->connect_host);
usr.bin/ssh/readconf.c
3398
fwd->connect_host = NULL;
usr.bin/ssh/readconf.c
3399
free(fwd->connect_path);
usr.bin/ssh/readconf.c
3400
fwd->connect_path = NULL;
usr.bin/ssh/readconf.c
3401
free(fwd->listen_host);
usr.bin/ssh/readconf.c
3402
fwd->listen_host = NULL;
usr.bin/ssh/readconf.c
3403
free(fwd->listen_path);
usr.bin/ssh/readconf.c
3404
fwd->listen_path = NULL;
usr.bin/ssh/readconf.c
366
struct Forward *fwd;
usr.bin/ssh/readconf.c
3673
const struct Forward *fwd;
usr.bin/ssh/readconf.c
3678
fwd = &fwds[i];
usr.bin/ssh/readconf.c
3679
if (code == oDynamicForward && fwd->connect_host != NULL &&
usr.bin/ssh/readconf.c
3680
strcmp(fwd->connect_host, "socks") != 0)
usr.bin/ssh/readconf.c
3682
if (code == oLocalForward && fwd->connect_host != NULL &&
usr.bin/ssh/readconf.c
3683
strcmp(fwd->connect_host, "socks") == 0)
usr.bin/ssh/readconf.c
3686
if (fwd->listen_port == PORT_STREAMLOCAL)
usr.bin/ssh/readconf.c
3687
printf(" %s", fwd->listen_path);
usr.bin/ssh/readconf.c
3688
else if (fwd->listen_host == NULL)
usr.bin/ssh/readconf.c
3689
printf(" %d", fwd->listen_port);
usr.bin/ssh/readconf.c
3692
fwd->listen_host, fwd->listen_port);
usr.bin/ssh/readconf.c
3695
if (fwd->connect_port == PORT_STREAMLOCAL)
usr.bin/ssh/readconf.c
3696
printf(" %s", fwd->connect_path);
usr.bin/ssh/readconf.c
3697
else if (fwd->connect_host == NULL)
usr.bin/ssh/readconf.c
3698
printf(" %d", fwd->connect_port);
usr.bin/ssh/readconf.c
3701
fwd->connect_host, fwd->connect_port);
usr.bin/ssh/readconf.c
377
fwd = &options->local_forwards[options->num_local_forwards++];
usr.bin/ssh/readconf.c
379
fwd->listen_host = newfwd->listen_host;
usr.bin/ssh/readconf.c
380
fwd->listen_port = newfwd->listen_port;
usr.bin/ssh/readconf.c
381
fwd->listen_path = newfwd->listen_path;
usr.bin/ssh/readconf.c
382
fwd->connect_host = newfwd->connect_host;
usr.bin/ssh/readconf.c
383
fwd->connect_port = newfwd->connect_port;
usr.bin/ssh/readconf.c
384
fwd->connect_path = newfwd->connect_path;
usr.bin/ssh/readconf.c
395
struct Forward *fwd;
usr.bin/ssh/readconf.c
406
fwd = &options->remote_forwards[options->num_remote_forwards++];
usr.bin/ssh/readconf.c
408
fwd->listen_host = newfwd->listen_host;
usr.bin/ssh/readconf.c
409
fwd->listen_port = newfwd->listen_port;
usr.bin/ssh/readconf.c
410
fwd->listen_path = newfwd->listen_path;
usr.bin/ssh/readconf.c
411
fwd->connect_host = newfwd->connect_host;
usr.bin/ssh/readconf.c
412
fwd->connect_port = newfwd->connect_port;
usr.bin/ssh/readconf.c
413
fwd->connect_path = newfwd->connect_path;
usr.bin/ssh/readconf.c
414
fwd->handle = newfwd->handle;
usr.bin/ssh/readconf.c
415
fwd->allocated_port = 0;
usr.bin/ssh/serverloop.c
751
struct Forward fwd;
usr.bin/ssh/serverloop.c
753
memset(&fwd, 0, sizeof(fwd));
usr.bin/ssh/serverloop.c
764
if ((r = sshpkt_get_cstring(ssh, &fwd.listen_host, NULL)) != 0 ||
usr.bin/ssh/serverloop.c
768
fwd.listen_host, port);
usr.bin/ssh/serverloop.c
770
fwd.listen_port = (int)port;
usr.bin/ssh/serverloop.c
776
(!want_reply && fwd.listen_port == 0)) {
usr.bin/ssh/serverloop.c
781
success = channel_setup_remote_fwd_listener(ssh, &fwd,
usr.bin/ssh/serverloop.c
790
if ((r = sshpkt_get_cstring(ssh, &fwd.listen_host, NULL)) != 0 ||
usr.bin/ssh/serverloop.c
795
fwd.listen_host, port);
usr.bin/ssh/serverloop.c
797
fwd.listen_port = (int)port;
usr.bin/ssh/serverloop.c
798
success = channel_cancel_rport_listener(ssh, &fwd);
usr.bin/ssh/serverloop.c
801
if ((r = sshpkt_get_cstring(ssh, &fwd.listen_path, NULL)) != 0)
usr.bin/ssh/serverloop.c
804
fwd.listen_path);
usr.bin/ssh/serverloop.c
816
&fwd, NULL, &options.fwd_opts);
usr.bin/ssh/serverloop.c
819
if ((r = sshpkt_get_cstring(ssh, &fwd.listen_path, NULL)) != 0)
usr.bin/ssh/serverloop.c
822
fwd.listen_path);
usr.bin/ssh/serverloop.c
824
success = channel_cancel_rport_listener(ssh, &fwd);
usr.bin/ssh/serverloop.c
840
free(fwd.listen_host);
usr.bin/ssh/serverloop.c
841
free(fwd.listen_path);
usr.bin/ssh/ssh-agent.c
1683
u_char fwd = 0;
usr.bin/ssh/ssh-agent.c
1690
(r = sshbuf_get_u8(e->request, &fwd)) != 0) {
usr.bin/ssh/ssh-agent.c
1745
e->session_ids[i].forwarded = fwd != 0;
usr.bin/ssh/ssh.c
1005
if (parse_forward(&fwd, optarg, 1, 0)) {
usr.bin/ssh/ssh.c
1006
add_local_forward(&options, &fwd);
usr.bin/ssh/ssh.c
639
struct Forward fwd;
usr.bin/ssh/ssh.c
905
if (parse_forward(&fwd, optarg, 1, 0)) {
usr.bin/ssh/ssh.c
907
fwd.listen_port == PORT_STREAMLOCAL ?
usr.bin/ssh/ssh.c
908
fwd.listen_path : fwd.listen_host;
usr.bin/ssh/ssh.c
909
options.stdio_forward_port = fwd.listen_port;
usr.bin/ssh/ssh.c
910
free(fwd.connect_host);
usr.bin/ssh/ssh.c
982
if (parse_forward(&fwd, optarg, 0, 0))
usr.bin/ssh/ssh.c
983
add_local_forward(&options, &fwd);
usr.bin/ssh/ssh.c
993
if (parse_forward(&fwd, optarg, 0, 1) ||
usr.bin/ssh/ssh.c
994
parse_forward(&fwd, optarg, 1, 1)) {
usr.bin/ssh/ssh.c
995
add_remote_forward(&options, &fwd);
usr.bin/ul/ul.c
255
fwd();
usr.bin/ul/ul.c
469
fwd();
usr.bin/ul/ul.c
84
void fwd(void);
usr.sbin/smtpd/smtp_session.c
665
char fwd[64], rev[64];
usr.sbin/smtpd/smtp_session.c
679
strlcpy(fwd, sa_to_text(ai->ai_addr), sizeof(fwd));
usr.sbin/smtpd/smtp_session.c
680
if (!strcmp(fwd, rev)) {
usr.sbin/unbound/daemon/remote.c
2680
struct iter_forwards* fwd = worker->env.fwds;
usr.sbin/unbound/daemon/remote.c
2683
if(!fwd) {
usr.sbin/unbound/daemon/remote.c
2688
(void)print_root_fwds(ssl, fwd, root);
usr.sbin/unbound/daemon/remote.c
2696
forwards_delete_zone(fwd, LDNS_RR_CLASS_IN, root, nolock);
usr.sbin/unbound/daemon/remote.c
2701
if(!forwards_add_zone(fwd, LDNS_RR_CLASS_IN, dp, nolock)) {
usr.sbin/unbound/daemon/remote.c
2759
struct iter_forwards* fwd = worker->env.fwds;
usr.sbin/unbound/daemon/remote.c
2769
lock_rw_wrlock(&fwd->lock);
usr.sbin/unbound/daemon/remote.c
2773
lock_rw_unlock(&fwd->lock);
usr.sbin/unbound/daemon/remote.c
2780
if(!forwards_add_zone(fwd, LDNS_RR_CLASS_IN, dp, nolock)) {
usr.sbin/unbound/daemon/remote.c
2781
lock_rw_unlock(&fwd->lock);
usr.sbin/unbound/daemon/remote.c
2786
lock_rw_unlock(&fwd->lock);
usr.sbin/unbound/daemon/remote.c
2795
struct iter_forwards* fwd = worker->env.fwds;
usr.sbin/unbound/daemon/remote.c
2802
lock_rw_wrlock(&fwd->lock);
usr.sbin/unbound/daemon/remote.c
2806
forwards_delete_zone(fwd, LDNS_RR_CLASS_IN, nm, nolock);
usr.sbin/unbound/daemon/remote.c
2807
lock_rw_unlock(&fwd->lock);
usr.sbin/unbound/daemon/remote.c
2816
struct iter_forwards* fwd = worker->env.fwds;
usr.sbin/unbound/daemon/remote.c
2826
lock_rw_wrlock(&fwd->lock);
usr.sbin/unbound/daemon/remote.c
2831
lock_rw_unlock(&fwd->lock);
usr.sbin/unbound/daemon/remote.c
2839
if(!forwards_add_stub_hole(fwd, LDNS_RR_CLASS_IN, nm, nolock)) {
usr.sbin/unbound/daemon/remote.c
2843
lock_rw_unlock(&fwd->lock);
usr.sbin/unbound/daemon/remote.c
2853
forwards_delete_stub_hole(fwd, LDNS_RR_CLASS_IN, nm, nolock);
usr.sbin/unbound/daemon/remote.c
2857
lock_rw_unlock(&fwd->lock);
usr.sbin/unbound/daemon/remote.c
2862
lock_rw_unlock(&fwd->lock);
usr.sbin/unbound/daemon/remote.c
2872
struct iter_forwards* fwd = worker->env.fwds;
usr.sbin/unbound/daemon/remote.c
2879
lock_rw_wrlock(&fwd->lock);
usr.sbin/unbound/daemon/remote.c
2884
forwards_delete_stub_hole(fwd, LDNS_RR_CLASS_IN, nm, nolock);
usr.sbin/unbound/daemon/remote.c
2886
lock_rw_unlock(&fwd->lock);
usr.sbin/unbound/iterator/iter_fwd.c
100
forwards_delete(struct iter_forwards* fwd)
usr.sbin/unbound/iterator/iter_fwd.c
102
if(!fwd)
usr.sbin/unbound/iterator/iter_fwd.c
104
lock_rw_destroy(&fwd->lock);
usr.sbin/unbound/iterator/iter_fwd.c
105
fwd_del_tree(fwd);
usr.sbin/unbound/iterator/iter_fwd.c
106
free(fwd);
usr.sbin/unbound/iterator/iter_fwd.c
111
forwards_insert_data(struct iter_forwards* fwd, uint16_t c, uint8_t* nm,
usr.sbin/unbound/iterator/iter_fwd.c
131
if(!rbtree_insert(fwd->tree, &node->node)) {
usr.sbin/unbound/iterator/iter_fwd.c
143
fwd_zone_find(struct iter_forwards* fwd, uint16_t c, uint8_t* nm)
usr.sbin/unbound/iterator/iter_fwd.c
150
return (struct iter_forward_zone*)rbtree_search(fwd->tree, &key);
usr.sbin/unbound/iterator/iter_fwd.c
155
forwards_insert(struct iter_forwards* fwd, uint16_t c, struct delegpt* dp)
usr.sbin/unbound/iterator/iter_fwd.c
157
return forwards_insert_data(fwd, c, dp->name, dp->namelen,
usr.sbin/unbound/iterator/iter_fwd.c
163
fwd_init_parents(struct iter_forwards* fwd)
usr.sbin/unbound/iterator/iter_fwd.c
167
RBTREE_FOR(node, struct iter_forward_zone*, fwd->tree) {
usr.sbin/unbound/iterator/iter_fwd.c
277
read_forwards(struct iter_forwards* fwd, struct config_file* cfg)
usr.sbin/unbound/iterator/iter_fwd.c
302
if(!forwards_insert(fwd, LDNS_RR_CLASS_IN, dp))
usr.sbin/unbound/iterator/iter_fwd.c
310
fwd_add_stub_hole(struct iter_forwards* fwd, uint16_t c, uint8_t* nm)
usr.sbin/unbound/iterator/iter_fwd.c
317
return forwards_insert_data(fwd, key.dclass, key.name,
usr.sbin/unbound/iterator/iter_fwd.c
323
make_stub_holes(struct iter_forwards* fwd, struct config_file* cfg)
usr.sbin/unbound/iterator/iter_fwd.c
335
if(fwd_zone_find(fwd, LDNS_RR_CLASS_IN, dname) != NULL) {
usr.sbin/unbound/iterator/iter_fwd.c
340
if(!fwd_add_stub_hole(fwd, LDNS_RR_CLASS_IN, dname)) {
usr.sbin/unbound/iterator/iter_fwd.c
352
make_auth_holes(struct iter_forwards* fwd, struct config_file* cfg)
usr.sbin/unbound/iterator/iter_fwd.c
364
if(fwd_zone_find(fwd, LDNS_RR_CLASS_IN, dname) != NULL) {
usr.sbin/unbound/iterator/iter_fwd.c
369
if(!fwd_add_stub_hole(fwd, LDNS_RR_CLASS_IN, dname)) {
usr.sbin/unbound/iterator/iter_fwd.c
380
forwards_apply_cfg(struct iter_forwards* fwd, struct config_file* cfg)
usr.sbin/unbound/iterator/iter_fwd.c
382
if(fwd->tree) {
usr.sbin/unbound/iterator/iter_fwd.c
383
lock_unprotect(&fwd->lock, fwd->tree);
usr.sbin/unbound/iterator/iter_fwd.c
385
fwd_del_tree(fwd);
usr.sbin/unbound/iterator/iter_fwd.c
386
fwd->tree = rbtree_create(fwd_cmp);
usr.sbin/unbound/iterator/iter_fwd.c
387
if(!fwd->tree)
usr.sbin/unbound/iterator/iter_fwd.c
389
lock_protect(&fwd->lock, fwd->tree, sizeof(*fwd->tree));
usr.sbin/unbound/iterator/iter_fwd.c
391
lock_rw_wrlock(&fwd->lock);
usr.sbin/unbound/iterator/iter_fwd.c
393
if(!read_forwards(fwd, cfg)) {
usr.sbin/unbound/iterator/iter_fwd.c
394
lock_rw_unlock(&fwd->lock);
usr.sbin/unbound/iterator/iter_fwd.c
397
if(!make_stub_holes(fwd, cfg)) {
usr.sbin/unbound/iterator/iter_fwd.c
398
lock_rw_unlock(&fwd->lock);
usr.sbin/unbound/iterator/iter_fwd.c
407
if(!make_auth_holes(fwd, cfg)) {
usr.sbin/unbound/iterator/iter_fwd.c
408
lock_rw_unlock(&fwd->lock);
usr.sbin/unbound/iterator/iter_fwd.c
411
fwd_init_parents(fwd);
usr.sbin/unbound/iterator/iter_fwd.c
412
lock_rw_unlock(&fwd->lock);
usr.sbin/unbound/iterator/iter_fwd.c
417
forwards_find(struct iter_forwards* fwd, uint8_t* qname, uint16_t qclass,
usr.sbin/unbound/iterator/iter_fwd.c
428
if(!nolock) { lock_rw_rdlock(&fwd->lock); }
usr.sbin/unbound/iterator/iter_fwd.c
429
res = (struct iter_forward_zone*)rbtree_search(fwd->tree, &key);
usr.sbin/unbound/iterator/iter_fwd.c
431
if(!has_dp && !nolock) { lock_rw_unlock(&fwd->lock); }
usr.sbin/unbound/iterator/iter_fwd.c
436
forwards_lookup(struct iter_forwards* fwd, uint8_t* qname, uint16_t qclass,
usr.sbin/unbound/iterator/iter_fwd.c
449
if(!nolock) { lock_rw_rdlock(&fwd->lock); }
usr.sbin/unbound/iterator/iter_fwd.c
450
if(rbtree_find_less_equal(fwd->tree, &key, &res)) {
usr.sbin/unbound/iterator/iter_fwd.c
458
if(!nolock) { lock_rw_unlock(&fwd->lock); }
usr.sbin/unbound/iterator/iter_fwd.c
471
if(!has_dp && !nolock) { lock_rw_unlock(&fwd->lock); }
usr.sbin/unbound/iterator/iter_fwd.c
476
forwards_lookup_root(struct iter_forwards* fwd, uint16_t qclass, int nolock)
usr.sbin/unbound/iterator/iter_fwd.c
479
return forwards_lookup(fwd, &root, qclass, nolock);
usr.sbin/unbound/iterator/iter_fwd.c
485
next_root_locked(struct iter_forwards* fwd, uint16_t* dclass)
usr.sbin/unbound/iterator/iter_fwd.c
492
n = rbtree_first(fwd->tree);
usr.sbin/unbound/iterator/iter_fwd.c
502
return next_root_locked(fwd, dclass);
usr.sbin/unbound/iterator/iter_fwd.c
513
if(rbtree_find_less_equal(fwd->tree, &key, &n)) {
usr.sbin/unbound/iterator/iter_fwd.c
530
return next_root_locked(fwd, dclass);
usr.sbin/unbound/iterator/iter_fwd.c
535
forwards_next_root(struct iter_forwards* fwd, uint16_t* dclass, int nolock)
usr.sbin/unbound/iterator/iter_fwd.c
539
if(!nolock) { lock_rw_rdlock(&fwd->lock); }
usr.sbin/unbound/iterator/iter_fwd.c
540
ret = next_root_locked(fwd, dclass);
usr.sbin/unbound/iterator/iter_fwd.c
541
if(!nolock) { lock_rw_unlock(&fwd->lock); }
usr.sbin/unbound/iterator/iter_fwd.c
546
forwards_get_mem(struct iter_forwards* fwd)
usr.sbin/unbound/iterator/iter_fwd.c
550
if(!fwd)
usr.sbin/unbound/iterator/iter_fwd.c
552
lock_rw_rdlock(&fwd->lock);
usr.sbin/unbound/iterator/iter_fwd.c
553
s = sizeof(*fwd) + sizeof(*fwd->tree);
usr.sbin/unbound/iterator/iter_fwd.c
554
RBTREE_FOR(p, struct iter_forward_zone*, fwd->tree) {
usr.sbin/unbound/iterator/iter_fwd.c
557
lock_rw_unlock(&fwd->lock);
usr.sbin/unbound/iterator/iter_fwd.c
562
forwards_add_zone(struct iter_forwards* fwd, uint16_t c, struct delegpt* dp,
usr.sbin/unbound/iterator/iter_fwd.c
567
if(!nolock) { lock_rw_wrlock(&fwd->lock); }
usr.sbin/unbound/iterator/iter_fwd.c
568
if((z=fwd_zone_find(fwd, c, dp->name)) != NULL) {
usr.sbin/unbound/iterator/iter_fwd.c
569
(void)rbtree_delete(fwd->tree, &z->node);
usr.sbin/unbound/iterator/iter_fwd.c
572
if(!forwards_insert(fwd, c, dp)) {
usr.sbin/unbound/iterator/iter_fwd.c
573
if(!nolock) { lock_rw_unlock(&fwd->lock); }
usr.sbin/unbound/iterator/iter_fwd.c
576
fwd_init_parents(fwd);
usr.sbin/unbound/iterator/iter_fwd.c
577
if(!nolock) { lock_rw_unlock(&fwd->lock); }
usr.sbin/unbound/iterator/iter_fwd.c
582
forwards_delete_zone(struct iter_forwards* fwd, uint16_t c, uint8_t* nm,
usr.sbin/unbound/iterator/iter_fwd.c
587
if(!nolock) { lock_rw_wrlock(&fwd->lock); }
usr.sbin/unbound/iterator/iter_fwd.c
588
if(!(z=fwd_zone_find(fwd, c, nm))) {
usr.sbin/unbound/iterator/iter_fwd.c
589
if(!nolock) { lock_rw_unlock(&fwd->lock); }
usr.sbin/unbound/iterator/iter_fwd.c
592
(void)rbtree_delete(fwd->tree, &z->node);
usr.sbin/unbound/iterator/iter_fwd.c
594
fwd_init_parents(fwd);
usr.sbin/unbound/iterator/iter_fwd.c
595
if(!nolock) { lock_rw_unlock(&fwd->lock); }
usr.sbin/unbound/iterator/iter_fwd.c
599
forwards_add_stub_hole(struct iter_forwards* fwd, uint16_t c, uint8_t* nm,
usr.sbin/unbound/iterator/iter_fwd.c
603
if(!nolock) { lock_rw_wrlock(&fwd->lock); }
usr.sbin/unbound/iterator/iter_fwd.c
604
if(fwd_zone_find(fwd, c, nm) != NULL) {
usr.sbin/unbound/iterator/iter_fwd.c
605
if(!nolock) { lock_rw_unlock(&fwd->lock); }
usr.sbin/unbound/iterator/iter_fwd.c
608
if(!fwd_add_stub_hole(fwd, c, nm)) {
usr.sbin/unbound/iterator/iter_fwd.c
609
if(!nolock) { lock_rw_unlock(&fwd->lock); }
usr.sbin/unbound/iterator/iter_fwd.c
612
fwd_init_parents(fwd);
usr.sbin/unbound/iterator/iter_fwd.c
613
if(!nolock) { lock_rw_unlock(&fwd->lock); }
usr.sbin/unbound/iterator/iter_fwd.c
618
forwards_delete_stub_hole(struct iter_forwards* fwd, uint16_t c,
usr.sbin/unbound/iterator/iter_fwd.c
623
if(!nolock) { lock_rw_wrlock(&fwd->lock); }
usr.sbin/unbound/iterator/iter_fwd.c
624
if(!(z=fwd_zone_find(fwd, c, nm))) {
usr.sbin/unbound/iterator/iter_fwd.c
625
if(!nolock) { lock_rw_unlock(&fwd->lock); }
usr.sbin/unbound/iterator/iter_fwd.c
629
if(!nolock) { lock_rw_unlock(&fwd->lock); }
usr.sbin/unbound/iterator/iter_fwd.c
632
(void)rbtree_delete(fwd->tree, &z->node);
usr.sbin/unbound/iterator/iter_fwd.c
634
fwd_init_parents(fwd);
usr.sbin/unbound/iterator/iter_fwd.c
635
if(!nolock) { lock_rw_unlock(&fwd->lock); }
usr.sbin/unbound/iterator/iter_fwd.c
639
forwards_swap_tree(struct iter_forwards* fwd, struct iter_forwards* data)
usr.sbin/unbound/iterator/iter_fwd.c
641
rbtree_type* oldtree = fwd->tree;
usr.sbin/unbound/iterator/iter_fwd.c
643
lock_unprotect(&fwd->lock, oldtree);
usr.sbin/unbound/iterator/iter_fwd.c
648
fwd->tree = data->tree;
usr.sbin/unbound/iterator/iter_fwd.c
650
lock_protect(&fwd->lock, fwd->tree, sizeof(*fwd->tree));
usr.sbin/unbound/iterator/iter_fwd.c
70
struct iter_forwards* fwd = (struct iter_forwards*)calloc(1,
usr.sbin/unbound/iterator/iter_fwd.c
72
if(!fwd)
usr.sbin/unbound/iterator/iter_fwd.c
74
lock_rw_init(&fwd->lock);
usr.sbin/unbound/iterator/iter_fwd.c
75
return fwd;
usr.sbin/unbound/iterator/iter_fwd.c
92
static void fwd_del_tree(struct iter_forwards* fwd)
usr.sbin/unbound/iterator/iter_fwd.c
94
if(fwd->tree)
usr.sbin/unbound/iterator/iter_fwd.c
95
traverse_postorder(fwd->tree, &delfwdnode, NULL);
usr.sbin/unbound/iterator/iter_fwd.c
96
free(fwd->tree);
usr.sbin/unbound/iterator/iter_fwd.h
103
void forwards_delete(struct iter_forwards* fwd);
usr.sbin/unbound/iterator/iter_fwd.h
111
int forwards_apply_cfg(struct iter_forwards* fwd, struct config_file* cfg);
usr.sbin/unbound/iterator/iter_fwd.h
126
struct delegpt* forwards_find(struct iter_forwards* fwd, uint8_t* qname,
usr.sbin/unbound/iterator/iter_fwd.h
146
struct delegpt* forwards_lookup(struct iter_forwards* fwd,
usr.sbin/unbound/iterator/iter_fwd.h
156
struct delegpt* forwards_lookup_root(struct iter_forwards* fwd,
usr.sbin/unbound/iterator/iter_fwd.h
168
int forwards_next_root(struct iter_forwards* fwd, uint16_t* qclass,
usr.sbin/unbound/iterator/iter_fwd.h
177
size_t forwards_get_mem(struct iter_forwards* fwd);
usr.sbin/unbound/iterator/iter_fwd.h
194
int forwards_add_zone(struct iter_forwards* fwd, uint16_t c,
usr.sbin/unbound/iterator/iter_fwd.h
207
void forwards_delete_zone(struct iter_forwards* fwd, uint16_t c,
usr.sbin/unbound/iterator/iter_fwd.h
222
int forwards_add_stub_hole(struct iter_forwards* fwd, uint16_t c,
usr.sbin/unbound/iterator/iter_fwd.h
234
void forwards_delete_stub_hole(struct iter_forwards* fwd, uint16_t c,
usr.sbin/unbound/iterator/iter_fwd.h
244
void forwards_swap_tree(struct iter_forwards* fwd, struct iter_forwards* data);
usr.sbin/unbound/iterator/iter_utils.c
1328
iter_get_next_root(struct iter_hints* hints, struct iter_forwards* fwd,
usr.sbin/unbound/iterator/iter_utils.c
1336
lock_rw_rdlock(&fwd->lock);
usr.sbin/unbound/iterator/iter_utils.c
1339
r2 = forwards_next_root(fwd, &c2, nolock);
usr.sbin/unbound/iterator/iter_utils.c
1340
lock_rw_unlock(&fwd->lock);
usr.sbin/unbound/iterator/iter_utils.h
346
int iter_get_next_root(struct iter_hints* hints, struct iter_forwards* fwd,
usr.sbin/unbound/smallapp/unbound-checkconf.c
987
struct iter_forwards* fwd = forwards_create();
usr.sbin/unbound/smallapp/unbound-checkconf.c
988
if(!fwd || !forwards_apply_cfg(fwd, cfg)) {
usr.sbin/unbound/smallapp/unbound-checkconf.c
991
forwards_delete(fwd);