Home
last modified time | relevance | path

Searched refs:dir (Results 1 – 25 of 64) sorted by relevance

123

/net/ipv4/netfilter/
Dnf_nat_h323.c99 int dir = CTINFO2DIR(ctinfo); in set_sig_addr() local
106 if (addr.ip == ct->tuplehash[dir].tuple.src.u3.ip && in set_sig_addr()
107 port == info->sig_port[dir]) { in set_sig_addr()
119 &ct->tuplehash[!dir].tuple.dst.u3.ip, in set_sig_addr()
120 info->sig_port[!dir]); in set_sig_addr()
123 &ct->tuplehash[!dir]. in set_sig_addr()
125 info->sig_port[!dir]); in set_sig_addr()
126 } else if (addr.ip == ct->tuplehash[dir].tuple.dst.u3.ip && in set_sig_addr()
127 port == info->sig_port[dir]) { in set_sig_addr()
131 &ct->tuplehash[!dir].tuple.src.u3.ip, in set_sig_addr()
[all …]
Dnf_nat_l3proto_ipv4.c34 enum ip_conntrack_dir dir, in nf_nat_ipv4_decode_session() argument
38 const struct nf_conntrack_tuple *t = &ct->tuplehash[dir].tuple; in nf_nat_ipv4_decode_session()
186 enum ip_conntrack_dir dir = CTINFO2DIR(ctinfo); in nf_nat_icmp_reply_translation() local
214 if (dir == IP_CT_DIR_REPLY) in nf_nat_icmp_reply_translation()
222 l4proto, &ct->tuplehash[!dir].tuple, !manip)) in nf_nat_icmp_reply_translation()
235 nf_ct_invert_tuplepr(&target, &ct->tuplehash[!dir].tuple); in nf_nat_icmp_reply_translation()
374 enum ip_conntrack_dir dir = CTINFO2DIR(ctinfo); in nf_nat_ipv4_out() local
376 if ((ct->tuplehash[dir].tuple.src.u3.ip != in nf_nat_ipv4_out()
377 ct->tuplehash[!dir].tuple.dst.u3.ip) || in nf_nat_ipv4_out()
378 (ct->tuplehash[dir].tuple.dst.protonum != IPPROTO_ICMP && in nf_nat_ipv4_out()
[all …]
Dnf_nat_pptp.c57 if (exp->dir == IP_CT_DIR_ORIGINAL) { in pptp_nat_expected()
61 t.src.u3.ip = master->tuplehash[!exp->dir].tuple.src.u3.ip; in pptp_nat_expected()
63 t.dst.u3.ip = master->tuplehash[!exp->dir].tuple.dst.u3.ip; in pptp_nat_expected()
70 t.src.u3.ip = master->tuplehash[!exp->dir].tuple.src.u3.ip; in pptp_nat_expected()
72 t.dst.u3.ip = master->tuplehash[!exp->dir].tuple.dst.u3.ip; in pptp_nat_expected()
94 = ct->master->tuplehash[!exp->dir].tuple.dst.u3; in pptp_nat_expected()
95 if (exp->dir == IP_CT_DIR_ORIGINAL) { in pptp_nat_expected()
104 = ct->master->tuplehash[!exp->dir].tuple.src.u3; in pptp_nat_expected()
105 if (exp->dir == IP_CT_DIR_REPLY) { in pptp_nat_expected()
207 expect_orig->dir = IP_CT_DIR_ORIGINAL; in pptp_exp_gre()
[all …]
/net/netfilter/
Dnf_conntrack_ftp.c338 static int find_nl_seq(u32 seq, const struct nf_ct_ftp_master *info, int dir) in find_nl_seq() argument
342 for (i = 0; i < info->seq_aft_nl_num[dir]; i++) in find_nl_seq()
343 if (info->seq_aft_nl[dir][i] == seq) in find_nl_seq()
350 struct nf_ct_ftp_master *info, int dir, in update_nl_seq() argument
356 for (i = 0; i < info->seq_aft_nl_num[dir]; i++) { in update_nl_seq()
357 if (info->seq_aft_nl[dir][i] == nl_seq) in update_nl_seq()
361 if (info->seq_aft_nl_num[dir] < NUM_SEQ_TO_REMEMBER) { in update_nl_seq()
362 info->seq_aft_nl[dir][info->seq_aft_nl_num[dir]++] = nl_seq; in update_nl_seq()
364 if (before(info->seq_aft_nl[dir][0], info->seq_aft_nl[dir][1])) in update_nl_seq()
369 if (after(nl_seq, info->seq_aft_nl[dir][oldest])) in update_nl_seq()
[all …]
Dnf_nat_sip.c98 enum ip_conntrack_dir dir = CTINFO2DIR(ctinfo); in map_addr() local
105 if (nf_inet_addr_cmp(&ct->tuplehash[dir].tuple.src.u3, addr) && in map_addr()
106 ct->tuplehash[dir].tuple.src.u.udp.port == port) { in map_addr()
107 newaddr = ct->tuplehash[!dir].tuple.dst.u3; in map_addr()
108 newport = ct->tuplehash[!dir].tuple.dst.u.udp.port; in map_addr()
109 } else if (nf_inet_addr_cmp(&ct->tuplehash[dir].tuple.dst.u3, addr) && in map_addr()
110 ct->tuplehash[dir].tuple.dst.u.udp.port == port) { in map_addr()
111 newaddr = ct->tuplehash[!dir].tuple.src.u3; in map_addr()
113 ct->tuplehash[!dir].tuple.src.u.udp.port; in map_addr()
149 enum ip_conntrack_dir dir = CTINFO2DIR(ctinfo); in nf_nat_sip() local
[all …]
Dnf_conntrack_h323_main.c124 int dir = CTINFO2DIR(ctinfo); in get_tpkt_data() local
155 if (info->tpkt_len[dir] > 0) { in get_tpkt_data()
158 "bytes\n", info->tpkt_len[dir]); in get_tpkt_data()
159 if (info->tpkt_len[dir] <= tcpdatalen) { in get_tpkt_data()
163 *datalen = info->tpkt_len[dir]; in get_tpkt_data()
199 info->tpkt_len[dir] = tpktlen - 4; in get_tpkt_data()
214 info->tpkt_len[dir] = 0; in get_tpkt_data()
218 info->tpkt_len[dir] = 0; in get_tpkt_data()
264 int dir = CTINFO2DIR(ctinfo); in expect_rtp_rtcp() local
275 memcmp(&addr, &ct->tuplehash[dir].tuple.src.u3, sizeof(addr)) || in expect_rtp_rtcp()
[all …]
Dnf_conntrack_seqadj.c12 enum ip_conntrack_dir dir = CTINFO2DIR(ctinfo); in nf_ct_seqadj_init() local
22 this_way = &seqadj->seq[dir]; in nf_ct_seqadj_init()
33 enum ip_conntrack_dir dir = CTINFO2DIR(ctinfo); in nf_ct_seqadj_set() local
47 this_way = &seqadj->seq[dir]; in nf_ct_seqadj_set()
122 unsigned int dir, optoff, optend; in nf_ct_sack_adjust() local
131 dir = CTINFO2DIR(ctinfo); in nf_ct_sack_adjust()
154 &seqadj->seq[!dir]); in nf_ct_sack_adjust()
166 enum ip_conntrack_dir dir = CTINFO2DIR(ctinfo); in nf_ct_seq_adjust() local
174 this_way = &seqadj->seq[dir]; in nf_ct_seq_adjust()
175 other_way = &seqadj->seq[!dir]; in nf_ct_seq_adjust()
[all …]
Dnf_conntrack_proto_gre.c115 int nf_ct_gre_keymap_add(struct nf_conn *ct, enum ip_conntrack_dir dir, in nf_ct_gre_keymap_add() argument
123 kmp = &ct_pptp_info->keymap[dir]; in nf_ct_gre_keymap_add()
135 dir == IP_CT_DIR_REPLY ? "reply" : "orig", ct); in nf_ct_gre_keymap_add()
162 enum ip_conntrack_dir dir; in nf_ct_gre_keymap_destroy() local
167 for (dir = IP_CT_DIR_ORIGINAL; dir < IP_CT_DIR_MAX; dir++) { in nf_ct_gre_keymap_destroy()
168 if (ct_pptp_info->keymap[dir]) { in nf_ct_gre_keymap_destroy()
170 ct_pptp_info->keymap[dir]); in nf_ct_gre_keymap_destroy()
171 list_del(&ct_pptp_info->keymap[dir]->list); in nf_ct_gre_keymap_destroy()
172 kfree(ct_pptp_info->keymap[dir]); in nf_ct_gre_keymap_destroy()
173 ct_pptp_info->keymap[dir] = NULL; in nf_ct_gre_keymap_destroy()
Dnf_conntrack_proto_sctp.c244 static int sctp_new_state(enum ip_conntrack_dir dir, in sctp_new_state() argument
305 dir, sctp_conntrack_names[cur_state], chunk_type, in sctp_new_state()
306 sctp_conntrack_names[sctp_conntracks[dir][i][cur_state]]); in sctp_new_state()
308 return sctp_conntracks[dir][i][cur_state]; in sctp_new_state()
326 enum ip_conntrack_dir dir = CTINFO2DIR(ctinfo); in sctp_packet() local
349 sh->vtag != ct->proto.sctp.vtag[dir]) { in sctp_packet()
364 if (sh->vtag != ct->proto.sctp.vtag[dir] && in sctp_packet()
365 sh->vtag != ct->proto.sctp.vtag[!dir]) in sctp_packet()
369 if (sh->vtag != ct->proto.sctp.vtag[dir] && in sctp_packet()
370 sh->vtag != ct->proto.sctp.vtag[!dir] && in sctp_packet()
[all …]
Dnf_conntrack_proto_tcp.c500 enum ip_conntrack_dir dir, in tcp_in_window() argument
509 struct ip_ct_tcp_state *sender = &state->seen[dir]; in tcp_in_window()
510 struct ip_ct_tcp_state *receiver = &state->seen[!dir]; in tcp_in_window()
511 const struct nf_conntrack_tuple *tuple = &ct->tuplehash[dir].tuple; in tcp_in_window()
528 receiver_offset = nf_ct_seq_offset(ct, !dir, ack - 1); in tcp_in_window()
589 && dir == IP_CT_DIR_ORIGINAL) in tcp_in_window()
591 && dir == IP_CT_DIR_REPLY)) in tcp_in_window()
692 if (state->last_dir == dir in tcp_in_window()
699 state->last_dir = dir; in tcp_in_window()
822 enum ip_conntrack_dir dir; in tcp_packet() local
[all …]
Dnft_ct.c27 enum ip_conntrack_dir dir:8; member
127 priv->key, priv->dir); in nft_ct_get_eval()
141 tuple = &ct->tuplehash[priv->dir].tuple; in nft_ct_get_eval()
320 priv->dir = IP_CT_DIR_MAX; in nft_ct_get_init()
328 priv->dir = nla_get_u8(tb[NFTA_CT_DIRECTION]); in nft_ct_get_init()
329 switch (priv->dir) { in nft_ct_get_init()
442 if (nla_put_u8(skb, NFTA_CT_DIRECTION, priv->dir)) in nft_ct_get_dump()
447 if (priv->dir < IP_CT_DIR_MAX && in nft_ct_get_dump()
448 nla_put_u8(skb, NFTA_CT_DIRECTION, priv->dir)) in nft_ct_get_dump()
Dnf_nat_ftp.c69 int dir = CTINFO2DIR(ctinfo); in nf_nat_ftp() local
77 newaddr = ct->tuplehash[!dir].tuple.dst.u3; in nf_nat_ftp()
79 exp->dir = !dir; in nf_nat_ftp()
Dnf_conntrack_pptp.c205 enum ip_conntrack_dir dir; in exp_gre() local
218 dir = IP_CT_DIR_ORIGINAL; in exp_gre()
221 &ct->tuplehash[dir].tuple.src.u3, in exp_gre()
222 &ct->tuplehash[dir].tuple.dst.u3, in exp_gre()
227 dir = IP_CT_DIR_REPLY; in exp_gre()
230 &ct->tuplehash[dir].tuple.src.u3, in exp_gre()
231 &ct->tuplehash[dir].tuple.dst.u3, in exp_gre()
512 int dir = CTINFO2DIR(ctinfo); in conntrack_pptp_help() local
575 if (dir == IP_CT_DIR_ORIGINAL) in conntrack_pptp_help()
Dnf_conntrack_acct.c40 seq_print_acct(struct seq_file *s, const struct nf_conn *ct, int dir) in seq_print_acct() argument
51 (unsigned long long)atomic64_read(&counter[dir].packets), in seq_print_acct()
52 (unsigned long long)atomic64_read(&counter[dir].bytes)); in seq_print_acct()
Dnf_conntrack_irc.c117 int dir = CTINFO2DIR(ctinfo); in help() local
128 if (dir == IP_CT_DIR_REPLY) in help()
189 tuple = &ct->tuplehash[dir].tuple; in help()
205 tuple = &ct->tuplehash[!dir].tuple; in help()
Dnf_conntrack_proto_dccp.c485 enum ip_conntrack_dir dir = CTINFO2DIR(ctinfo); in dccp_packet() local
503 role = ct->proto.dccp.role[dir]; in dccp_packet()
513 ct->proto.dccp.role[dir] = CT_DCCP_ROLE_CLIENT; in dccp_packet()
514 ct->proto.dccp.role[!dir] = CT_DCCP_ROLE_SERVER; in dccp_packet()
533 if (ct->proto.dccp.last_dir == !dir && in dccp_packet()
536 ct->proto.dccp.role[!dir] = CT_DCCP_ROLE_CLIENT; in dccp_packet()
537 ct->proto.dccp.role[dir] = CT_DCCP_ROLE_SERVER; in dccp_packet()
542 ct->proto.dccp.last_dir = dir; in dccp_packet()
558 ct->proto.dccp.last_dir = dir; in dccp_packet()
/net/xfrm/
Dxfrm_policy.c59 static void __xfrm_policy_link(struct xfrm_policy *pol, int dir);
61 int dir);
190 int dir; in xfrm_policy_timer() local
197 dir = xfrm_policy_id2dir(xp->index); in xfrm_policy_timer()
237 km_policy_expired(xp, dir, 0, 0); in xfrm_policy_timer()
249 if (!xfrm_policy_delete(xp, dir)) in xfrm_policy_timer()
250 km_policy_expired(xp, dir, 1, 0); in xfrm_policy_timer()
362 unsigned short family, int dir, in __get_hash_thresh() argument
367 *dbits = net->xfrm.policy_bydst[dir].dbits4; in __get_hash_thresh()
368 *sbits = net->xfrm.policy_bydst[dir].sbits4; in __get_hash_thresh()
[all …]
Dxfrm_user.c1268 static int verify_policy_dir(u8 dir) in verify_policy_dir() argument
1270 switch (dir) { in verify_policy_dir()
1338 ret = verify_policy_dir(p->dir); in verify_newpolicy_info()
1341 if (p->index && ((p->index & XFRM_POLICY_MAX) != p->dir)) in verify_newpolicy_info()
1493 static void copy_to_user_policy(struct xfrm_policy *xp, struct xfrm_userpolicy_info *p, int dir) in copy_to_user_policy() argument
1502 p->dir = dir; in copy_to_user_policy()
1565 err = xfrm_policy_insert(p->dir, xp, excl); in xfrm_add_policy()
1577 km_policy_notify(xp, p->dir, &c); in xfrm_add_policy()
1653 static int dump_one_policy(struct xfrm_policy *xp, int dir, int count, void *ptr) in dump_one_policy() argument
1668 copy_to_user_policy(xp, p, dir); in dump_one_policy()
[all …]
/net/sunrpc/
Drpc_pipe.c492 static int __rpc_create_common(struct inode *dir, struct dentry *dentry, in __rpc_create_common() argument
500 inode = rpc_get_inode(dir->i_sb, mode); in __rpc_create_common()
503 inode->i_ino = iunique(dir->i_sb, 100); in __rpc_create_common()
517 static int __rpc_create(struct inode *dir, struct dentry *dentry, in __rpc_create() argument
524 err = __rpc_create_common(dir, dentry, S_IFREG | mode, i_fop, private); in __rpc_create()
527 fsnotify_create(dir, dentry); in __rpc_create()
531 static int __rpc_mkdir(struct inode *dir, struct dentry *dentry, in __rpc_mkdir() argument
538 err = __rpc_create_common(dir, dentry, S_IFDIR | mode, i_fop, private); in __rpc_mkdir()
541 inc_nlink(dir); in __rpc_mkdir()
542 fsnotify_mkdir(dir, dentry); in __rpc_mkdir()
[all …]
/net/ipv6/netfilter/
Dnf_nat_l3proto_ipv6.c33 enum ip_conntrack_dir dir, in nf_nat_ipv6_decode_session() argument
37 const struct nf_conntrack_tuple *t = &ct->tuplehash[dir].tuple; in nf_nat_ipv6_decode_session()
197 enum ip_conntrack_dir dir = CTINFO2DIR(ctinfo); in nf_nat_icmpv6_reply_translation() local
224 if (dir == IP_CT_DIR_REPLY) in nf_nat_icmpv6_reply_translation()
232 l4proto, &ct->tuplehash[!dir].tuple, !manip)) in nf_nat_icmpv6_reply_translation()
246 nf_ct_invert_tuplepr(&target, &ct->tuplehash[!dir].tuple); in nf_nat_icmpv6_reply_translation()
390 enum ip_conntrack_dir dir = CTINFO2DIR(ctinfo); in nf_nat_ipv6_out() local
392 if (!nf_inet_addr_cmp(&ct->tuplehash[dir].tuple.src.u3, in nf_nat_ipv6_out()
393 &ct->tuplehash[!dir].tuple.dst.u3) || in nf_nat_ipv6_out()
394 (ct->tuplehash[dir].tuple.dst.protonum != IPPROTO_ICMPV6 && in nf_nat_ipv6_out()
[all …]
/net/netlabel/
Dnetlabel_addrlist.c329 char *dir = (src ? "src" : "dst"); in netlbl_af4list_audit_addr() local
333 audit_log_format(audit_buf, " %s=%pI4", dir, &addr); in netlbl_af4list_audit_addr()
340 audit_log_format(audit_buf, " %s_prefixlen=%d", dir, mask_len); in netlbl_af4list_audit_addr()
363 char *dir = (src ? "src" : "dst"); in netlbl_af6list_audit_addr() local
367 audit_log_format(audit_buf, " %s=%pI6", dir, addr); in netlbl_af6list_audit_addr()
379 audit_log_format(audit_buf, " %s_prefixlen=%d", dir, mask_len); in netlbl_af6list_audit_addr()
/net/nfc/
Ddigital_dep.c76 u8 dir; member
87 u8 dir; member
99 u8 dir; member
107 u8 dir; member
113 u8 dir; member
337 (psl_res->dir != DIGITAL_NFC_DEP_FRAME_DIR_IN) || in digital_in_recv_psl_res()
389 psl_req->dir = DIGITAL_NFC_DEP_FRAME_DIR_OUT; in digital_in_send_psl_req()
511 atr_req->dir = DIGITAL_NFC_DEP_FRAME_DIR_OUT; in digital_in_send_atr_req()
558 dep_req->dir = DIGITAL_NFC_DEP_FRAME_DIR_OUT; in digital_in_send_ack()
595 dep_req->dir = DIGITAL_NFC_DEP_FRAME_DIR_OUT; in digital_in_send_nack()
[all …]
/net/mac80211/
Ddebugfs_key.c324 debugfs_create_file(#name, 0400, key->debugfs.dir, \
327 debugfs_create_file(#name, 0600, key->debugfs.dir, \
342 key->debugfs.dir = debugfs_create_dir(buf, in ieee80211_debugfs_key_add()
345 if (!key->debugfs.dir) in ieee80211_debugfs_key_add()
353 debugfs_create_symlink("station", key->debugfs.dir, buf); in ieee80211_debugfs_key_add()
375 debugfs_remove_recursive(key->debugfs.dir); in ieee80211_debugfs_key_remove()
376 key->debugfs.dir = NULL; in ieee80211_debugfs_key_remove()
Ddebugfs_netdev.c707 struct dentry *dir = debugfs_create_dir("mesh_stats", in add_mesh_stats() local
710 debugfs_create_file(#name, 0400, dir, sdata, &name##_ops); in add_mesh_stats()
723 struct dentry *dir = debugfs_create_dir("mesh_config", in add_mesh_config() local
727 debugfs_create_file(#name, 0600, dir, sdata, &name##_ops); in add_mesh_config()
823 struct dentry *dir; in ieee80211_debugfs_rename_netdev() local
826 dir = sdata->vif.debugfs_dir; in ieee80211_debugfs_rename_netdev()
828 if (!dir) in ieee80211_debugfs_rename_netdev()
832 if (!debugfs_rename(dir->d_parent, dir, dir->d_parent, buf)) in ieee80211_debugfs_rename_netdev()
/net/core/
Dflow.c36 u8 dir; member
195 flow_cache_lookup(struct net *net, const struct flowi *key, u16 family, u8 dir, in flow_cache_lookup() argument
227 tfle->dir == dir && in flow_cache_lookup()
248 fle->dir = dir; in flow_cache_lookup()
273 flo = resolver(net, key, family, dir, flo, ctx); in flow_cache_lookup()

123