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
282
read_forwards(struct iter_forwards* fwd, struct config_file* cfg)
sbin/unwind/libunbound/iterator/iter_fwd.c
307
if(!forwards_insert(fwd, LDNS_RR_CLASS_IN, dp))
sbin/unwind/libunbound/iterator/iter_fwd.c
315
fwd_add_stub_hole(struct iter_forwards* fwd, uint16_t c, uint8_t* nm)
sbin/unwind/libunbound/iterator/iter_fwd.c
322
return forwards_insert_data(fwd, key.dclass, key.name,
sbin/unwind/libunbound/iterator/iter_fwd.c
328
make_stub_holes(struct iter_forwards* fwd, struct config_file* cfg)
sbin/unwind/libunbound/iterator/iter_fwd.c
340
if(fwd_zone_find(fwd, LDNS_RR_CLASS_IN, dname) != NULL) {
sbin/unwind/libunbound/iterator/iter_fwd.c
345
if(!fwd_add_stub_hole(fwd, LDNS_RR_CLASS_IN, dname)) {
sbin/unwind/libunbound/iterator/iter_fwd.c
357
make_auth_holes(struct iter_forwards* fwd, struct config_file* cfg)
sbin/unwind/libunbound/iterator/iter_fwd.c
369
if(fwd_zone_find(fwd, LDNS_RR_CLASS_IN, dname) != NULL) {
sbin/unwind/libunbound/iterator/iter_fwd.c
374
if(!fwd_add_stub_hole(fwd, LDNS_RR_CLASS_IN, dname)) {
sbin/unwind/libunbound/iterator/iter_fwd.c
385
forwards_apply_cfg(struct iter_forwards* fwd, struct config_file* cfg)
sbin/unwind/libunbound/iterator/iter_fwd.c
387
if(fwd->tree) {
sbin/unwind/libunbound/iterator/iter_fwd.c
388
lock_unprotect(&fwd->lock, fwd->tree);
sbin/unwind/libunbound/iterator/iter_fwd.c
390
fwd_del_tree(fwd);
sbin/unwind/libunbound/iterator/iter_fwd.c
391
fwd->tree = rbtree_create(fwd_cmp);
sbin/unwind/libunbound/iterator/iter_fwd.c
392
if(!fwd->tree)
sbin/unwind/libunbound/iterator/iter_fwd.c
394
lock_protect(&fwd->lock, fwd->tree, sizeof(*fwd->tree));
sbin/unwind/libunbound/iterator/iter_fwd.c
396
lock_rw_wrlock(&fwd->lock);
sbin/unwind/libunbound/iterator/iter_fwd.c
398
if(!read_forwards(fwd, cfg)) {
sbin/unwind/libunbound/iterator/iter_fwd.c
399
lock_rw_unlock(&fwd->lock);
sbin/unwind/libunbound/iterator/iter_fwd.c
402
if(!make_stub_holes(fwd, cfg)) {
sbin/unwind/libunbound/iterator/iter_fwd.c
403
lock_rw_unlock(&fwd->lock);
sbin/unwind/libunbound/iterator/iter_fwd.c
412
if(!make_auth_holes(fwd, cfg)) {
sbin/unwind/libunbound/iterator/iter_fwd.c
413
lock_rw_unlock(&fwd->lock);
sbin/unwind/libunbound/iterator/iter_fwd.c
416
fwd_init_parents(fwd);
sbin/unwind/libunbound/iterator/iter_fwd.c
417
lock_rw_unlock(&fwd->lock);
sbin/unwind/libunbound/iterator/iter_fwd.c
422
forwards_find(struct iter_forwards* fwd, uint8_t* qname, uint16_t qclass,
sbin/unwind/libunbound/iterator/iter_fwd.c
433
if(!nolock) { lock_rw_rdlock(&fwd->lock); }
sbin/unwind/libunbound/iterator/iter_fwd.c
434
res = (struct iter_forward_zone*)rbtree_search(fwd->tree, &key);
sbin/unwind/libunbound/iterator/iter_fwd.c
436
if(!has_dp && !nolock) { lock_rw_unlock(&fwd->lock); }
sbin/unwind/libunbound/iterator/iter_fwd.c
441
forwards_lookup(struct iter_forwards* fwd, uint8_t* qname, uint16_t qclass,
sbin/unwind/libunbound/iterator/iter_fwd.c
454
if(!nolock) { lock_rw_rdlock(&fwd->lock); }
sbin/unwind/libunbound/iterator/iter_fwd.c
455
if(rbtree_find_less_equal(fwd->tree, &key, &res)) {
sbin/unwind/libunbound/iterator/iter_fwd.c
463
if(!nolock) { lock_rw_unlock(&fwd->lock); }
sbin/unwind/libunbound/iterator/iter_fwd.c
476
if(!has_dp && !nolock) { lock_rw_unlock(&fwd->lock); }
sbin/unwind/libunbound/iterator/iter_fwd.c
481
forwards_lookup_root(struct iter_forwards* fwd, uint16_t qclass, int nolock)
sbin/unwind/libunbound/iterator/iter_fwd.c
484
return forwards_lookup(fwd, &root, qclass, nolock);
sbin/unwind/libunbound/iterator/iter_fwd.c
490
next_root_locked(struct iter_forwards* fwd, uint16_t* dclass)
sbin/unwind/libunbound/iterator/iter_fwd.c
497
n = rbtree_first(fwd->tree);
sbin/unwind/libunbound/iterator/iter_fwd.c
507
return next_root_locked(fwd, dclass);
sbin/unwind/libunbound/iterator/iter_fwd.c
518
if(rbtree_find_less_equal(fwd->tree, &key, &n)) {
sbin/unwind/libunbound/iterator/iter_fwd.c
535
return next_root_locked(fwd, dclass);
sbin/unwind/libunbound/iterator/iter_fwd.c
540
forwards_next_root(struct iter_forwards* fwd, uint16_t* dclass, int nolock)
sbin/unwind/libunbound/iterator/iter_fwd.c
544
if(!nolock) { lock_rw_rdlock(&fwd->lock); }
sbin/unwind/libunbound/iterator/iter_fwd.c
545
ret = next_root_locked(fwd, dclass);
sbin/unwind/libunbound/iterator/iter_fwd.c
546
if(!nolock) { lock_rw_unlock(&fwd->lock); }
sbin/unwind/libunbound/iterator/iter_fwd.c
551
forwards_get_mem(struct iter_forwards* fwd)
sbin/unwind/libunbound/iterator/iter_fwd.c
555
if(!fwd)
sbin/unwind/libunbound/iterator/iter_fwd.c
557
lock_rw_rdlock(&fwd->lock);
sbin/unwind/libunbound/iterator/iter_fwd.c
558
s = sizeof(*fwd) + sizeof(*fwd->tree);
sbin/unwind/libunbound/iterator/iter_fwd.c
559
RBTREE_FOR(p, struct iter_forward_zone*, fwd->tree) {
sbin/unwind/libunbound/iterator/iter_fwd.c
562
lock_rw_unlock(&fwd->lock);
sbin/unwind/libunbound/iterator/iter_fwd.c
567
forwards_add_zone(struct iter_forwards* fwd, uint16_t c, struct delegpt* dp,
sbin/unwind/libunbound/iterator/iter_fwd.c
572
if(!nolock) { lock_rw_wrlock(&fwd->lock); }
sbin/unwind/libunbound/iterator/iter_fwd.c
573
if((z=fwd_zone_find(fwd, c, dp->name)) != NULL) {
sbin/unwind/libunbound/iterator/iter_fwd.c
574
(void)rbtree_delete(fwd->tree, &z->node);
sbin/unwind/libunbound/iterator/iter_fwd.c
577
if(!forwards_insert(fwd, c, dp)) {
sbin/unwind/libunbound/iterator/iter_fwd.c
578
if(!nolock) { lock_rw_unlock(&fwd->lock); }
sbin/unwind/libunbound/iterator/iter_fwd.c
581
fwd_init_parents(fwd);
sbin/unwind/libunbound/iterator/iter_fwd.c
582
if(!nolock) { lock_rw_unlock(&fwd->lock); }
sbin/unwind/libunbound/iterator/iter_fwd.c
587
forwards_delete_zone(struct iter_forwards* fwd, uint16_t c, uint8_t* nm,
sbin/unwind/libunbound/iterator/iter_fwd.c
592
if(!nolock) { lock_rw_wrlock(&fwd->lock); }
sbin/unwind/libunbound/iterator/iter_fwd.c
593
if(!(z=fwd_zone_find(fwd, c, nm))) {
sbin/unwind/libunbound/iterator/iter_fwd.c
594
if(!nolock) { lock_rw_unlock(&fwd->lock); }
sbin/unwind/libunbound/iterator/iter_fwd.c
597
(void)rbtree_delete(fwd->tree, &z->node);
sbin/unwind/libunbound/iterator/iter_fwd.c
599
fwd_init_parents(fwd);
sbin/unwind/libunbound/iterator/iter_fwd.c
600
if(!nolock) { lock_rw_unlock(&fwd->lock); }
sbin/unwind/libunbound/iterator/iter_fwd.c
604
forwards_add_stub_hole(struct iter_forwards* fwd, uint16_t c, uint8_t* nm,
sbin/unwind/libunbound/iterator/iter_fwd.c
608
if(!nolock) { lock_rw_wrlock(&fwd->lock); }
sbin/unwind/libunbound/iterator/iter_fwd.c
609
if(fwd_zone_find(fwd, c, nm) != NULL) {
sbin/unwind/libunbound/iterator/iter_fwd.c
610
if(!nolock) { lock_rw_unlock(&fwd->lock); }
sbin/unwind/libunbound/iterator/iter_fwd.c
613
if(!fwd_add_stub_hole(fwd, c, nm)) {
sbin/unwind/libunbound/iterator/iter_fwd.c
614
if(!nolock) { lock_rw_unlock(&fwd->lock); }
sbin/unwind/libunbound/iterator/iter_fwd.c
617
fwd_init_parents(fwd);
sbin/unwind/libunbound/iterator/iter_fwd.c
618
if(!nolock) { lock_rw_unlock(&fwd->lock); }
sbin/unwind/libunbound/iterator/iter_fwd.c
623
forwards_delete_stub_hole(struct iter_forwards* fwd, uint16_t c,
sbin/unwind/libunbound/iterator/iter_fwd.c
628
if(!nolock) { lock_rw_wrlock(&fwd->lock); }
sbin/unwind/libunbound/iterator/iter_fwd.c
629
if(!(z=fwd_zone_find(fwd, c, nm))) {
sbin/unwind/libunbound/iterator/iter_fwd.c
630
if(!nolock) { lock_rw_unlock(&fwd->lock); }
sbin/unwind/libunbound/iterator/iter_fwd.c
634
if(!nolock) { lock_rw_unlock(&fwd->lock); }
sbin/unwind/libunbound/iterator/iter_fwd.c
637
(void)rbtree_delete(fwd->tree, &z->node);
sbin/unwind/libunbound/iterator/iter_fwd.c
639
fwd_init_parents(fwd);
sbin/unwind/libunbound/iterator/iter_fwd.c
640
if(!nolock) { lock_rw_unlock(&fwd->lock); }
sbin/unwind/libunbound/iterator/iter_fwd.c
644
forwards_swap_tree(struct iter_forwards* fwd, struct iter_forwards* data)
sbin/unwind/libunbound/iterator/iter_fwd.c
646
rbtree_type* oldtree = fwd->tree;
sbin/unwind/libunbound/iterator/iter_fwd.c
648
lock_unprotect(&fwd->lock, oldtree);
sbin/unwind/libunbound/iterator/iter_fwd.c
653
fwd->tree = data->tree;
sbin/unwind/libunbound/iterator/iter_fwd.c
655
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
1365
iter_get_next_root(struct iter_hints* hints, struct iter_forwards* fwd,
sbin/unwind/libunbound/iterator/iter_utils.c
1373
lock_rw_rdlock(&fwd->lock);
sbin/unwind/libunbound/iterator/iter_utils.c
1376
r2 = forwards_next_root(fwd, &c2, nolock);
sbin/unwind/libunbound/iterator/iter_utils.c
1377
lock_rw_unlock(&fwd->lock);
sbin/unwind/libunbound/iterator/iter_utils.h
347
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
579
u_int rtableid, int fwd)
sys/netinet/ip_output.c
594
pf_test(AF_INET, fwd ? PF_FWD : PF_OUT, encif, &m) != PF_PASS) {
sys/netinet6/ip6_output.c
2732
u_int rtableid, int fwd)
sys/netinet6/ip6_output.c
2747
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
3845
struct Forward *fwd, int *allocated_listen_port,
usr.bin/ssh/channels.c
3857
if (is_client && fwd->connect_path != NULL) {
usr.bin/ssh/channels.c
3858
host = fwd->connect_path;
usr.bin/ssh/channels.c
3861
fwd->listen_host : fwd->connect_host;
usr.bin/ssh/channels.c
3873
addr = channel_fwd_bind_addr(ssh, fwd->listen_host, &wildcard,
usr.bin/ssh/channels.c
3886
snprintf(strport, sizeof strport, "%d", fwd->listen_port);
usr.bin/ssh/channels.c
3918
fwd->listen_port == 0 && allocated_listen_port != NULL &&
usr.bin/ssh/channels.c
3966
fwd->listen_port == 0 &&
usr.bin/ssh/channels.c
3979
c->host_port = fwd->connect_port;
usr.bin/ssh/channels.c
3981
if (fwd->listen_port == 0 && allocated_listen_port != NULL &&
usr.bin/ssh/channels.c
3985
c->listening_port = fwd->listen_port;
usr.bin/ssh/channels.c
3989
error_f("cannot listen to port: %d", fwd->listen_port);
usr.bin/ssh/channels.c
3996
struct Forward *fwd, struct ForwardOptions *fwd_opts)
usr.bin/ssh/channels.c
4006
if (fwd->connect_path != NULL) {
usr.bin/ssh/channels.c
4007
if (strlen(fwd->connect_path) > sizeof(sunaddr.sun_path)) {
usr.bin/ssh/channels.c
4009
fwd->connect_path);
usr.bin/ssh/channels.c
4012
path = fwd->connect_path;
usr.bin/ssh/channels.c
4015
if (fwd->connect_host == NULL) {
usr.bin/ssh/channels.c
4019
if (strlen(fwd->connect_host) >= NI_MAXHOST) {
usr.bin/ssh/channels.c
4023
path = fwd->connect_host;
usr.bin/ssh/channels.c
4024
port = fwd->connect_port;
usr.bin/ssh/channels.c
4028
path = fwd->listen_path;
usr.bin/ssh/channels.c
4036
if (fwd->listen_path == NULL) {
usr.bin/ssh/channels.c
4040
if (strlen(fwd->listen_path) > sizeof(sunaddr.sun_path)) {
usr.bin/ssh/channels.c
4041
error("Local listening path too long: %s", fwd->listen_path);
usr.bin/ssh/channels.c
4045
debug3_f("type %d path %s", type, fwd->listen_path);
usr.bin/ssh/channels.c
4049
sock = unix_listener(fwd->listen_path, SSH_LISTEN_BACKLOG,
usr.bin/ssh/channels.c
4055
debug("Local forwarding listening on path %s.", fwd->listen_path);
usr.bin/ssh/channels.c
4064
c->listening_addr = xstrdup(fwd->listen_path);
usr.bin/ssh/channels.c
4112
channel_cancel_rport_listener(struct ssh *ssh, struct Forward *fwd)
usr.bin/ssh/channels.c
4114
if (fwd->listen_path != NULL) {
usr.bin/ssh/channels.c
4116
fwd->listen_path);
usr.bin/ssh/channels.c
4119
fwd->listen_host, fwd->listen_port);
usr.bin/ssh/channels.c
4188
struct Forward *fwd, int cport, struct ForwardOptions *fwd_opts)
usr.bin/ssh/channels.c
4190
if (fwd->listen_path != NULL) {
usr.bin/ssh/channels.c
4192
fwd->listen_path);
usr.bin/ssh/channels.c
4195
fwd->listen_host, fwd->listen_port, cport, fwd_opts);
usr.bin/ssh/channels.c
4202
struct Forward *fwd, struct ForwardOptions *fwd_opts)
usr.bin/ssh/channels.c
4204
if (fwd->listen_path != NULL) {
usr.bin/ssh/channels.c
4206
SSH_CHANNEL_UNIX_LISTENER, fwd, fwd_opts);
usr.bin/ssh/channels.c
4209
SSH_CHANNEL_PORT_LISTENER, fwd, NULL, fwd_opts);
usr.bin/ssh/channels.c
4215
remote_open_match(struct permission *allowed_open, struct Forward *fwd)
usr.bin/ssh/channels.c
4221
if (fwd->listen_path != NULL)
usr.bin/ssh/channels.c
4224
if (fwd->listen_host == NULL || allowed_open->listen_host == NULL)
usr.bin/ssh/channels.c
4228
allowed_open->listen_port != fwd->listen_port)
usr.bin/ssh/channels.c
4232
lhost = xstrdup(fwd->listen_host);
usr.bin/ssh/channels.c
4242
check_rfwd_permission(struct ssh *ssh, struct Forward *fwd)
usr.bin/ssh/channels.c
4255
if (remote_open_match(perm, fwd)) {
usr.bin/ssh/channels.c
4266
if (remote_open_match(perm, fwd)) {
usr.bin/ssh/channels.c
4278
channel_setup_remote_fwd_listener(struct ssh *ssh, struct Forward *fwd,
usr.bin/ssh/channels.c
4281
if (!check_rfwd_permission(ssh, fwd)) {
usr.bin/ssh/channels.c
4283
if (fwd->listen_path != NULL)
usr.bin/ssh/channels.c
4289
fwd->listen_path);
usr.bin/ssh/channels.c
4290
else if(fwd->listen_host != NULL)
usr.bin/ssh/channels.c
4295
fwd->listen_host, fwd->listen_port );
usr.bin/ssh/channels.c
4302
if (fwd->listen_path != NULL) {
usr.bin/ssh/channels.c
4304
SSH_CHANNEL_RUNIX_LISTENER, fwd, fwd_opts);
usr.bin/ssh/channels.c
4307
SSH_CHANNEL_RPORT_LISTENER, fwd, allocated_listen_port,
usr.bin/ssh/channels.c
4334
channel_request_remote_forwarding(struct ssh *ssh, struct Forward *fwd)
usr.bin/ssh/channels.c
4341
if (fwd->listen_path != NULL) {
usr.bin/ssh/channels.c
4346
(r = sshpkt_put_cstring(ssh, fwd->listen_path)) != 0 ||
usr.bin/ssh/channels.c
4355
channel_rfwd_bind_host(fwd->listen_host))) != 0 ||
usr.bin/ssh/channels.c
4356
(r = sshpkt_put_u32(ssh, fwd->listen_port)) != 0 ||
usr.bin/ssh/channels.c
4367
if (fwd->connect_path != NULL) {
usr.bin/ssh/channels.c
4368
host_to_connect = fwd->connect_path;
usr.bin/ssh/channels.c
4371
host_to_connect = fwd->connect_host;
usr.bin/ssh/channels.c
4372
port_to_connect = fwd->connect_port;
usr.bin/ssh/channels.c
4374
if (fwd->listen_path != NULL) {
usr.bin/ssh/channels.c
4375
listen_path = fwd->listen_path;
usr.bin/ssh/channels.c
4378
listen_host = fwd->listen_host;
usr.bin/ssh/channels.c
4379
listen_port = fwd->listen_port;
usr.bin/ssh/channels.c
4522
channel_request_rforward_cancel(struct ssh *ssh, struct Forward *fwd)
usr.bin/ssh/channels.c
4524
if (fwd->listen_path != NULL) {
usr.bin/ssh/channels.c
4526
fwd->listen_path);
usr.bin/ssh/channels.c
4529
fwd->listen_host,
usr.bin/ssh/channels.c
4530
fwd->listen_port ? fwd->listen_port : fwd->allocated_port);
usr.bin/ssh/clientloop.c
1049
if (!parse_forward(&fwd, s, 1, 0)) {
usr.bin/ssh/clientloop.c
1054
ok = channel_request_rforward_cancel(ssh, &fwd) == 0;
usr.bin/ssh/clientloop.c
1056
ok = channel_cancel_lport_listener(ssh, &fwd,
usr.bin/ssh/clientloop.c
1059
ok = channel_cancel_lport_listener(ssh, &fwd,
usr.bin/ssh/clientloop.c
1070
if (!parse_forward(&fwd, s, 0, remote) &&
usr.bin/ssh/clientloop.c
1071
!parse_forward(&fwd, s, 1, remote)) {
usr.bin/ssh/clientloop.c
1075
} else if (!parse_forward(&fwd, s, dynamic, remote)) {
usr.bin/ssh/clientloop.c
1080
if (!channel_setup_local_fwd_listener(ssh, &fwd,
usr.bin/ssh/clientloop.c
1086
if (channel_request_remote_forwarding(ssh, &fwd) < 0) {
usr.bin/ssh/clientloop.c
1098
free(fwd.listen_host);
usr.bin/ssh/clientloop.c
1099
free(fwd.listen_path);
usr.bin/ssh/clientloop.c
1100
free(fwd.connect_host);
usr.bin/ssh/clientloop.c
1101
free(fwd.connect_path);
usr.bin/ssh/clientloop.c
985
struct Forward fwd;
usr.bin/ssh/clientloop.c
987
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
3204
parse_fwd_field(char **p, struct fwdarg *fwd)
usr.bin/ssh/readconf.c
3231
fwd->arg = cp + 1;
usr.bin/ssh/readconf.c
3232
fwd->ispath = ispath;
usr.bin/ssh/readconf.c
3253
fwd->arg = *p;
usr.bin/ssh/readconf.c
3254
fwd->ispath = ispath;
usr.bin/ssh/readconf.c
3270
parse_forward(struct Forward *fwd, const char *fwdspec, int dynamicfwd, int remotefwd)
usr.bin/ssh/readconf.c
3276
memset(fwd, 0, sizeof(*fwd));
usr.bin/ssh/readconf.c
3305
fwd->listen_path = xstrdup(fwdargs[0].arg);
usr.bin/ssh/readconf.c
3306
fwd->listen_port = PORT_STREAMLOCAL;
usr.bin/ssh/readconf.c
3308
fwd->listen_host = NULL;
usr.bin/ssh/readconf.c
3309
fwd->listen_port = a2port(fwdargs[0].arg);
usr.bin/ssh/readconf.c
3311
fwd->connect_host = xstrdup("socks");
usr.bin/ssh/readconf.c
3316
fwd->listen_path = xstrdup(fwdargs[0].arg);
usr.bin/ssh/readconf.c
3317
fwd->listen_port = PORT_STREAMLOCAL;
usr.bin/ssh/readconf.c
3318
fwd->connect_path = xstrdup(fwdargs[1].arg);
usr.bin/ssh/readconf.c
3319
fwd->connect_port = PORT_STREAMLOCAL;
usr.bin/ssh/readconf.c
3321
fwd->listen_host = NULL;
usr.bin/ssh/readconf.c
3322
fwd->listen_port = a2port(fwdargs[0].arg);
usr.bin/ssh/readconf.c
3323
fwd->connect_path = xstrdup(fwdargs[1].arg);
usr.bin/ssh/readconf.c
3324
fwd->connect_port = PORT_STREAMLOCAL;
usr.bin/ssh/readconf.c
3326
fwd->listen_host = xstrdup(fwdargs[0].arg);
usr.bin/ssh/readconf.c
3327
fwd->listen_port = a2port(fwdargs[1].arg);
usr.bin/ssh/readconf.c
3328
fwd->connect_host = xstrdup("socks");
usr.bin/ssh/readconf.c
3334
fwd->listen_path = xstrdup(fwdargs[0].arg);
usr.bin/ssh/readconf.c
3335
fwd->listen_port = PORT_STREAMLOCAL;
usr.bin/ssh/readconf.c
3336
fwd->connect_host = xstrdup(fwdargs[1].arg);
usr.bin/ssh/readconf.c
3337
fwd->connect_port = a2port(fwdargs[2].arg);
usr.bin/ssh/readconf.c
3339
fwd->listen_host = xstrdup(fwdargs[0].arg);
usr.bin/ssh/readconf.c
3340
fwd->listen_port = a2port(fwdargs[1].arg);
usr.bin/ssh/readconf.c
3341
fwd->connect_path = xstrdup(fwdargs[2].arg);
usr.bin/ssh/readconf.c
3342
fwd->connect_port = PORT_STREAMLOCAL;
usr.bin/ssh/readconf.c
3344
fwd->listen_host = NULL;
usr.bin/ssh/readconf.c
3345
fwd->listen_port = a2port(fwdargs[0].arg);
usr.bin/ssh/readconf.c
3346
fwd->connect_host = xstrdup(fwdargs[1].arg);
usr.bin/ssh/readconf.c
3347
fwd->connect_port = a2port(fwdargs[2].arg);
usr.bin/ssh/readconf.c
3352
fwd->listen_host = xstrdup(fwdargs[0].arg);
usr.bin/ssh/readconf.c
3353
fwd->listen_port = a2port(fwdargs[1].arg);
usr.bin/ssh/readconf.c
3354
fwd->connect_host = xstrdup(fwdargs[2].arg);
usr.bin/ssh/readconf.c
3355
fwd->connect_port = a2port(fwdargs[3].arg);
usr.bin/ssh/readconf.c
3368
if (fwd->connect_path == NULL &&
usr.bin/ssh/readconf.c
3369
fwd->listen_path == NULL)
usr.bin/ssh/readconf.c
3372
if (fwd->connect_port <= 0 && fwd->connect_path == NULL)
usr.bin/ssh/readconf.c
3376
if ((fwd->listen_port < 0 && fwd->listen_path == NULL) ||
usr.bin/ssh/readconf.c
3377
(!remotefwd && fwd->listen_port == 0))
usr.bin/ssh/readconf.c
3379
if (fwd->connect_host != NULL &&
usr.bin/ssh/readconf.c
3380
strlen(fwd->connect_host) >= NI_MAXHOST)
usr.bin/ssh/readconf.c
3386
if (fwd->connect_path != NULL &&
usr.bin/ssh/readconf.c
3387
strlen(fwd->connect_path) >= PATH_MAX_SUN)
usr.bin/ssh/readconf.c
3389
if (fwd->listen_host != NULL &&
usr.bin/ssh/readconf.c
3390
strlen(fwd->listen_host) >= NI_MAXHOST)
usr.bin/ssh/readconf.c
3392
if (fwd->listen_path != NULL &&
usr.bin/ssh/readconf.c
3393
strlen(fwd->listen_path) >= PATH_MAX_SUN)
usr.bin/ssh/readconf.c
3399
free(fwd->connect_host);
usr.bin/ssh/readconf.c
3400
fwd->connect_host = NULL;
usr.bin/ssh/readconf.c
3401
free(fwd->connect_path);
usr.bin/ssh/readconf.c
3402
fwd->connect_path = NULL;
usr.bin/ssh/readconf.c
3403
free(fwd->listen_host);
usr.bin/ssh/readconf.c
3404
fwd->listen_host = NULL;
usr.bin/ssh/readconf.c
3405
free(fwd->listen_path);
usr.bin/ssh/readconf.c
3406
fwd->listen_path = NULL;
usr.bin/ssh/readconf.c
366
struct Forward *fwd;
usr.bin/ssh/readconf.c
3675
const struct Forward *fwd;
usr.bin/ssh/readconf.c
3680
fwd = &fwds[i];
usr.bin/ssh/readconf.c
3681
if (code == oDynamicForward && fwd->connect_host != NULL &&
usr.bin/ssh/readconf.c
3682
strcmp(fwd->connect_host, "socks") != 0)
usr.bin/ssh/readconf.c
3684
if (code == oLocalForward && fwd->connect_host != NULL &&
usr.bin/ssh/readconf.c
3685
strcmp(fwd->connect_host, "socks") == 0)
usr.bin/ssh/readconf.c
3688
if (fwd->listen_port == PORT_STREAMLOCAL)
usr.bin/ssh/readconf.c
3689
printf(" %s", fwd->listen_path);
usr.bin/ssh/readconf.c
3690
else if (fwd->listen_host == NULL)
usr.bin/ssh/readconf.c
3691
printf(" %d", fwd->listen_port);
usr.bin/ssh/readconf.c
3694
fwd->listen_host, fwd->listen_port);
usr.bin/ssh/readconf.c
3697
if (fwd->connect_port == PORT_STREAMLOCAL)
usr.bin/ssh/readconf.c
3698
printf(" %s", fwd->connect_path);
usr.bin/ssh/readconf.c
3699
else if (fwd->connect_host == NULL)
usr.bin/ssh/readconf.c
3700
printf(" %d", fwd->connect_port);
usr.bin/ssh/readconf.c
3703
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
752
struct Forward fwd;
usr.bin/ssh/serverloop.c
754
memset(&fwd, 0, sizeof(fwd));
usr.bin/ssh/serverloop.c
765
if ((r = sshpkt_get_cstring(ssh, &fwd.listen_host, NULL)) != 0 ||
usr.bin/ssh/serverloop.c
769
fwd.listen_host, port);
usr.bin/ssh/serverloop.c
771
fwd.listen_port = (int)port;
usr.bin/ssh/serverloop.c
777
(!want_reply && fwd.listen_port == 0)) {
usr.bin/ssh/serverloop.c
782
success = channel_setup_remote_fwd_listener(ssh, &fwd,
usr.bin/ssh/serverloop.c
791
if ((r = sshpkt_get_cstring(ssh, &fwd.listen_host, NULL)) != 0 ||
usr.bin/ssh/serverloop.c
796
fwd.listen_host, port);
usr.bin/ssh/serverloop.c
798
fwd.listen_port = (int)port;
usr.bin/ssh/serverloop.c
799
success = channel_cancel_rport_listener(ssh, &fwd);
usr.bin/ssh/serverloop.c
802
if ((r = sshpkt_get_cstring(ssh, &fwd.listen_path, NULL)) != 0)
usr.bin/ssh/serverloop.c
805
fwd.listen_path);
usr.bin/ssh/serverloop.c
817
&fwd, NULL, &options.fwd_opts);
usr.bin/ssh/serverloop.c
820
if ((r = sshpkt_get_cstring(ssh, &fwd.listen_path, NULL)) != 0)
usr.bin/ssh/serverloop.c
823
fwd.listen_path);
usr.bin/ssh/serverloop.c
825
success = channel_cancel_rport_listener(ssh, &fwd);
usr.bin/ssh/serverloop.c
841
free(fwd.listen_host);
usr.bin/ssh/serverloop.c
842
free(fwd.listen_path);
usr.bin/ssh/ssh-agent.c
1690
u_char fwd = 0;
usr.bin/ssh/ssh-agent.c
1697
(r = sshbuf_get_u8(e->request, &fwd)) != 0) {
usr.bin/ssh/ssh-agent.c
1752
e->session_ids[i].forwarded = fwd != 0;
usr.bin/ssh/ssh.c
620
struct Forward fwd;
usr.bin/ssh/ssh.c
886
if (parse_forward(&fwd, optarg, 1, 0)) {
usr.bin/ssh/ssh.c
888
fwd.listen_port == PORT_STREAMLOCAL ?
usr.bin/ssh/ssh.c
889
fwd.listen_path : fwd.listen_host;
usr.bin/ssh/ssh.c
890
options.stdio_forward_port = fwd.listen_port;
usr.bin/ssh/ssh.c
891
free(fwd.connect_host);
usr.bin/ssh/ssh.c
963
if (parse_forward(&fwd, optarg, 0, 0))
usr.bin/ssh/ssh.c
964
add_local_forward(&options, &fwd);
usr.bin/ssh/ssh.c
974
if (parse_forward(&fwd, optarg, 0, 1) ||
usr.bin/ssh/ssh.c
975
parse_forward(&fwd, optarg, 1, 1)) {
usr.bin/ssh/ssh.c
976
add_remote_forward(&options, &fwd);
usr.bin/ssh/ssh.c
986
if (parse_forward(&fwd, optarg, 1, 0)) {
usr.bin/ssh/ssh.c
987
add_local_forward(&options, &fwd);
usr.bin/ul/ul.c
256
fwd();
usr.bin/ul/ul.c
470
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
2720
struct iter_forwards* fwd = worker->env.fwds;
usr.sbin/unbound/daemon/remote.c
2723
if(!fwd) {
usr.sbin/unbound/daemon/remote.c
2728
(void)print_root_fwds(ssl, fwd, root);
usr.sbin/unbound/daemon/remote.c
2736
forwards_delete_zone(fwd, LDNS_RR_CLASS_IN, root, nolock);
usr.sbin/unbound/daemon/remote.c
2741
if(!forwards_add_zone(fwd, LDNS_RR_CLASS_IN, dp, nolock)) {
usr.sbin/unbound/daemon/remote.c
2799
struct iter_forwards* fwd = worker->env.fwds;
usr.sbin/unbound/daemon/remote.c
2809
lock_rw_wrlock(&fwd->lock);
usr.sbin/unbound/daemon/remote.c
2813
lock_rw_unlock(&fwd->lock);
usr.sbin/unbound/daemon/remote.c
2820
if(!forwards_add_zone(fwd, LDNS_RR_CLASS_IN, dp, nolock)) {
usr.sbin/unbound/daemon/remote.c
2821
lock_rw_unlock(&fwd->lock);
usr.sbin/unbound/daemon/remote.c
2826
lock_rw_unlock(&fwd->lock);
usr.sbin/unbound/daemon/remote.c
2835
struct iter_forwards* fwd = worker->env.fwds;
usr.sbin/unbound/daemon/remote.c
2842
lock_rw_wrlock(&fwd->lock);
usr.sbin/unbound/daemon/remote.c
2846
forwards_delete_zone(fwd, LDNS_RR_CLASS_IN, nm, nolock);
usr.sbin/unbound/daemon/remote.c
2847
lock_rw_unlock(&fwd->lock);
usr.sbin/unbound/daemon/remote.c
2856
struct iter_forwards* fwd = worker->env.fwds;
usr.sbin/unbound/daemon/remote.c
2866
lock_rw_wrlock(&fwd->lock);
usr.sbin/unbound/daemon/remote.c
2871
lock_rw_unlock(&fwd->lock);
usr.sbin/unbound/daemon/remote.c
2879
if(!forwards_add_stub_hole(fwd, LDNS_RR_CLASS_IN, nm, nolock)) {
usr.sbin/unbound/daemon/remote.c
2883
lock_rw_unlock(&fwd->lock);
usr.sbin/unbound/daemon/remote.c
2893
forwards_delete_stub_hole(fwd, LDNS_RR_CLASS_IN, nm, nolock);
usr.sbin/unbound/daemon/remote.c
2897
lock_rw_unlock(&fwd->lock);
usr.sbin/unbound/daemon/remote.c
2902
lock_rw_unlock(&fwd->lock);
usr.sbin/unbound/daemon/remote.c
2912
struct iter_forwards* fwd = worker->env.fwds;
usr.sbin/unbound/daemon/remote.c
2919
lock_rw_wrlock(&fwd->lock);
usr.sbin/unbound/daemon/remote.c
2924
forwards_delete_stub_hole(fwd, LDNS_RR_CLASS_IN, nm, nolock);
usr.sbin/unbound/daemon/remote.c
2926
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
282
read_forwards(struct iter_forwards* fwd, struct config_file* cfg)
usr.sbin/unbound/iterator/iter_fwd.c
307
if(!forwards_insert(fwd, LDNS_RR_CLASS_IN, dp))
usr.sbin/unbound/iterator/iter_fwd.c
315
fwd_add_stub_hole(struct iter_forwards* fwd, uint16_t c, uint8_t* nm)
usr.sbin/unbound/iterator/iter_fwd.c
322
return forwards_insert_data(fwd, key.dclass, key.name,
usr.sbin/unbound/iterator/iter_fwd.c
328
make_stub_holes(struct iter_forwards* fwd, struct config_file* cfg)
usr.sbin/unbound/iterator/iter_fwd.c
340
if(fwd_zone_find(fwd, LDNS_RR_CLASS_IN, dname) != NULL) {
usr.sbin/unbound/iterator/iter_fwd.c
345
if(!fwd_add_stub_hole(fwd, LDNS_RR_CLASS_IN, dname)) {
usr.sbin/unbound/iterator/iter_fwd.c
357
make_auth_holes(struct iter_forwards* fwd, struct config_file* cfg)
usr.sbin/unbound/iterator/iter_fwd.c
369
if(fwd_zone_find(fwd, LDNS_RR_CLASS_IN, dname) != NULL) {
usr.sbin/unbound/iterator/iter_fwd.c
374
if(!fwd_add_stub_hole(fwd, LDNS_RR_CLASS_IN, dname)) {
usr.sbin/unbound/iterator/iter_fwd.c
385
forwards_apply_cfg(struct iter_forwards* fwd, struct config_file* cfg)
usr.sbin/unbound/iterator/iter_fwd.c
387
if(fwd->tree) {
usr.sbin/unbound/iterator/iter_fwd.c
388
lock_unprotect(&fwd->lock, fwd->tree);
usr.sbin/unbound/iterator/iter_fwd.c
390
fwd_del_tree(fwd);
usr.sbin/unbound/iterator/iter_fwd.c
391
fwd->tree = rbtree_create(fwd_cmp);
usr.sbin/unbound/iterator/iter_fwd.c
392
if(!fwd->tree)
usr.sbin/unbound/iterator/iter_fwd.c
394
lock_protect(&fwd->lock, fwd->tree, sizeof(*fwd->tree));
usr.sbin/unbound/iterator/iter_fwd.c
396
lock_rw_wrlock(&fwd->lock);
usr.sbin/unbound/iterator/iter_fwd.c
398
if(!read_forwards(fwd, cfg)) {
usr.sbin/unbound/iterator/iter_fwd.c
399
lock_rw_unlock(&fwd->lock);
usr.sbin/unbound/iterator/iter_fwd.c
402
if(!make_stub_holes(fwd, cfg)) {
usr.sbin/unbound/iterator/iter_fwd.c
403
lock_rw_unlock(&fwd->lock);
usr.sbin/unbound/iterator/iter_fwd.c
412
if(!make_auth_holes(fwd, cfg)) {
usr.sbin/unbound/iterator/iter_fwd.c
413
lock_rw_unlock(&fwd->lock);
usr.sbin/unbound/iterator/iter_fwd.c
416
fwd_init_parents(fwd);
usr.sbin/unbound/iterator/iter_fwd.c
417
lock_rw_unlock(&fwd->lock);
usr.sbin/unbound/iterator/iter_fwd.c
422
forwards_find(struct iter_forwards* fwd, uint8_t* qname, uint16_t qclass,
usr.sbin/unbound/iterator/iter_fwd.c
433
if(!nolock) { lock_rw_rdlock(&fwd->lock); }
usr.sbin/unbound/iterator/iter_fwd.c
434
res = (struct iter_forward_zone*)rbtree_search(fwd->tree, &key);
usr.sbin/unbound/iterator/iter_fwd.c
436
if(!has_dp && !nolock) { lock_rw_unlock(&fwd->lock); }
usr.sbin/unbound/iterator/iter_fwd.c
441
forwards_lookup(struct iter_forwards* fwd, uint8_t* qname, uint16_t qclass,
usr.sbin/unbound/iterator/iter_fwd.c
454
if(!nolock) { lock_rw_rdlock(&fwd->lock); }
usr.sbin/unbound/iterator/iter_fwd.c
455
if(rbtree_find_less_equal(fwd->tree, &key, &res)) {
usr.sbin/unbound/iterator/iter_fwd.c
463
if(!nolock) { lock_rw_unlock(&fwd->lock); }
usr.sbin/unbound/iterator/iter_fwd.c
476
if(!has_dp && !nolock) { lock_rw_unlock(&fwd->lock); }
usr.sbin/unbound/iterator/iter_fwd.c
481
forwards_lookup_root(struct iter_forwards* fwd, uint16_t qclass, int nolock)
usr.sbin/unbound/iterator/iter_fwd.c
484
return forwards_lookup(fwd, &root, qclass, nolock);
usr.sbin/unbound/iterator/iter_fwd.c
490
next_root_locked(struct iter_forwards* fwd, uint16_t* dclass)
usr.sbin/unbound/iterator/iter_fwd.c
497
n = rbtree_first(fwd->tree);
usr.sbin/unbound/iterator/iter_fwd.c
507
return next_root_locked(fwd, dclass);
usr.sbin/unbound/iterator/iter_fwd.c
518
if(rbtree_find_less_equal(fwd->tree, &key, &n)) {
usr.sbin/unbound/iterator/iter_fwd.c
535
return next_root_locked(fwd, dclass);
usr.sbin/unbound/iterator/iter_fwd.c
540
forwards_next_root(struct iter_forwards* fwd, uint16_t* dclass, int nolock)
usr.sbin/unbound/iterator/iter_fwd.c
544
if(!nolock) { lock_rw_rdlock(&fwd->lock); }
usr.sbin/unbound/iterator/iter_fwd.c
545
ret = next_root_locked(fwd, dclass);
usr.sbin/unbound/iterator/iter_fwd.c
546
if(!nolock) { lock_rw_unlock(&fwd->lock); }
usr.sbin/unbound/iterator/iter_fwd.c
551
forwards_get_mem(struct iter_forwards* fwd)
usr.sbin/unbound/iterator/iter_fwd.c
555
if(!fwd)
usr.sbin/unbound/iterator/iter_fwd.c
557
lock_rw_rdlock(&fwd->lock);
usr.sbin/unbound/iterator/iter_fwd.c
558
s = sizeof(*fwd) + sizeof(*fwd->tree);
usr.sbin/unbound/iterator/iter_fwd.c
559
RBTREE_FOR(p, struct iter_forward_zone*, fwd->tree) {
usr.sbin/unbound/iterator/iter_fwd.c
562
lock_rw_unlock(&fwd->lock);
usr.sbin/unbound/iterator/iter_fwd.c
567
forwards_add_zone(struct iter_forwards* fwd, uint16_t c, struct delegpt* dp,
usr.sbin/unbound/iterator/iter_fwd.c
572
if(!nolock) { lock_rw_wrlock(&fwd->lock); }
usr.sbin/unbound/iterator/iter_fwd.c
573
if((z=fwd_zone_find(fwd, c, dp->name)) != NULL) {
usr.sbin/unbound/iterator/iter_fwd.c
574
(void)rbtree_delete(fwd->tree, &z->node);
usr.sbin/unbound/iterator/iter_fwd.c
577
if(!forwards_insert(fwd, c, dp)) {
usr.sbin/unbound/iterator/iter_fwd.c
578
if(!nolock) { lock_rw_unlock(&fwd->lock); }
usr.sbin/unbound/iterator/iter_fwd.c
581
fwd_init_parents(fwd);
usr.sbin/unbound/iterator/iter_fwd.c
582
if(!nolock) { lock_rw_unlock(&fwd->lock); }
usr.sbin/unbound/iterator/iter_fwd.c
587
forwards_delete_zone(struct iter_forwards* fwd, uint16_t c, uint8_t* nm,
usr.sbin/unbound/iterator/iter_fwd.c
592
if(!nolock) { lock_rw_wrlock(&fwd->lock); }
usr.sbin/unbound/iterator/iter_fwd.c
593
if(!(z=fwd_zone_find(fwd, c, nm))) {
usr.sbin/unbound/iterator/iter_fwd.c
594
if(!nolock) { lock_rw_unlock(&fwd->lock); }
usr.sbin/unbound/iterator/iter_fwd.c
597
(void)rbtree_delete(fwd->tree, &z->node);
usr.sbin/unbound/iterator/iter_fwd.c
599
fwd_init_parents(fwd);
usr.sbin/unbound/iterator/iter_fwd.c
600
if(!nolock) { lock_rw_unlock(&fwd->lock); }
usr.sbin/unbound/iterator/iter_fwd.c
604
forwards_add_stub_hole(struct iter_forwards* fwd, uint16_t c, uint8_t* nm,
usr.sbin/unbound/iterator/iter_fwd.c
608
if(!nolock) { lock_rw_wrlock(&fwd->lock); }
usr.sbin/unbound/iterator/iter_fwd.c
609
if(fwd_zone_find(fwd, c, nm) != NULL) {
usr.sbin/unbound/iterator/iter_fwd.c
610
if(!nolock) { lock_rw_unlock(&fwd->lock); }
usr.sbin/unbound/iterator/iter_fwd.c
613
if(!fwd_add_stub_hole(fwd, c, nm)) {
usr.sbin/unbound/iterator/iter_fwd.c
614
if(!nolock) { lock_rw_unlock(&fwd->lock); }
usr.sbin/unbound/iterator/iter_fwd.c
617
fwd_init_parents(fwd);
usr.sbin/unbound/iterator/iter_fwd.c
618
if(!nolock) { lock_rw_unlock(&fwd->lock); }
usr.sbin/unbound/iterator/iter_fwd.c
623
forwards_delete_stub_hole(struct iter_forwards* fwd, uint16_t c,
usr.sbin/unbound/iterator/iter_fwd.c
628
if(!nolock) { lock_rw_wrlock(&fwd->lock); }
usr.sbin/unbound/iterator/iter_fwd.c
629
if(!(z=fwd_zone_find(fwd, c, nm))) {
usr.sbin/unbound/iterator/iter_fwd.c
630
if(!nolock) { lock_rw_unlock(&fwd->lock); }
usr.sbin/unbound/iterator/iter_fwd.c
634
if(!nolock) { lock_rw_unlock(&fwd->lock); }
usr.sbin/unbound/iterator/iter_fwd.c
637
(void)rbtree_delete(fwd->tree, &z->node);
usr.sbin/unbound/iterator/iter_fwd.c
639
fwd_init_parents(fwd);
usr.sbin/unbound/iterator/iter_fwd.c
640
if(!nolock) { lock_rw_unlock(&fwd->lock); }
usr.sbin/unbound/iterator/iter_fwd.c
644
forwards_swap_tree(struct iter_forwards* fwd, struct iter_forwards* data)
usr.sbin/unbound/iterator/iter_fwd.c
646
rbtree_type* oldtree = fwd->tree;
usr.sbin/unbound/iterator/iter_fwd.c
648
lock_unprotect(&fwd->lock, oldtree);
usr.sbin/unbound/iterator/iter_fwd.c
653
fwd->tree = data->tree;
usr.sbin/unbound/iterator/iter_fwd.c
655
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
1365
iter_get_next_root(struct iter_hints* hints, struct iter_forwards* fwd,
usr.sbin/unbound/iterator/iter_utils.c
1373
lock_rw_rdlock(&fwd->lock);
usr.sbin/unbound/iterator/iter_utils.c
1376
r2 = forwards_next_root(fwd, &c2, nolock);
usr.sbin/unbound/iterator/iter_utils.c
1377
lock_rw_unlock(&fwd->lock);
usr.sbin/unbound/iterator/iter_utils.h
347
int iter_get_next_root(struct iter_hints* hints, struct iter_forwards* fwd,
usr.sbin/unbound/smallapp/unbound-checkconf.c
1033
struct iter_forwards* fwd = forwards_create();
usr.sbin/unbound/smallapp/unbound-checkconf.c
1034
if(!fwd || !forwards_apply_cfg(fwd, cfg)) {
usr.sbin/unbound/smallapp/unbound-checkconf.c
1037
forwards_delete(fwd);