Home
last modified time | relevance | path

Searched refs:fd (Results 1 – 23 of 23) sorted by relevance

/net/
Dcompat.c363 static int __compat_sys_setsockopt(int fd, int level, int optname, in __compat_sys_setsockopt() argument
372 sock = sockfd_lookup(fd, &err); in __compat_sys_setsockopt()
394 COMPAT_SYSCALL_DEFINE5(setsockopt, int, fd, int, level, int, optname, in COMPAT_SYSCALL_DEFINE5() argument
397 return __compat_sys_setsockopt(fd, level, optname, optval, optlen); in COMPAT_SYSCALL_DEFINE5()
400 static int __compat_sys_getsockopt(int fd, int level, int optname, in __compat_sys_getsockopt() argument
405 struct socket *sock = sockfd_lookup(fd, &err); in __compat_sys_getsockopt()
428 COMPAT_SYSCALL_DEFINE5(getsockopt, int, fd, int, level, int, optname, in COMPAT_SYSCALL_DEFINE5() argument
431 return __compat_sys_getsockopt(fd, level, optname, optval, optlen); in COMPAT_SYSCALL_DEFINE5()
638 static inline long __compat_sys_sendmsg(int fd, in __compat_sys_sendmsg() argument
642 return __sys_sendmsg(fd, (struct user_msghdr __user *)msg, in __compat_sys_sendmsg()
[all …]
Dsocket.c124 static int sock_fasync(int fd, struct file *filp, int on);
415 int fd = get_unused_fd_flags(flags); in sock_map_fd() local
416 if (unlikely(fd < 0)) { in sock_map_fd()
418 return fd; in sock_map_fd()
423 fd_install(fd, newfile); in sock_map_fd()
424 return fd; in sock_map_fd()
427 put_unused_fd(fd); in sock_map_fd()
462 struct socket *sockfd_lookup(int fd, int *err) in sockfd_lookup() argument
467 file = fget(fd); in sockfd_lookup()
480 static struct socket *sockfd_lookup_light(int fd, int *err, int *fput_needed) in sockfd_lookup_light() argument
[all …]
/net/l2tp/
Dl2tp_ppp.c561 int fd; member
580 info->fd = sa_v2in4->pppol2tp.fd; in pppol2tp_sockaddr_get_info()
596 info->fd = sa_v3in4->pppol2tp.fd; in pppol2tp_sockaddr_get_info()
612 info->fd = sa_v2in6->pppol2tp.fd; in pppol2tp_sockaddr_get_info()
628 info->fd = sa_v3in6->pppol2tp.fd; in pppol2tp_sockaddr_get_info()
716 if (info.fd < 0) { in pppol2tp_connect()
721 error = l2tp_tunnel_create(sock_net(sk), info.fd, in pppol2tp_connect()
935 sp.pppol2tp.fd = tunnel->fd; in pppol2tp_getname()
954 sp.pppol2tp.fd = tunnel->fd; in pppol2tp_getname()
973 sp.pppol2tp.fd = tunnel->fd; in pppol2tp_getname()
[all …]
Dl2tp_core.c1093 if (tunnel->fd >= 0 && sk->sk_state != TCP_ESTABLISHED) { in l2tp_xmit_skb()
1257 if (tunnel->fd < 0) { in l2tp_tunnel_del_work()
1402 int l2tp_tunnel_create(struct net *net, int fd, int version, u32 tunnel_id, u32 peer_tunnel_id, str… in l2tp_tunnel_create() argument
1433 tunnel->fd = fd; in l2tp_tunnel_create()
1477 if (tunnel->fd < 0) { in l2tp_tunnel_register()
1484 sock = sockfd_lookup(tunnel->fd, &ret); in l2tp_tunnel_register()
1531 if (tunnel->fd >= 0) in l2tp_tunnel_register()
1537 if (tunnel->fd < 0) in l2tp_tunnel_register()
Dl2tp_core.h174 int fd; /* Parent fd, if tunnel socket member
204 int l2tp_tunnel_create(struct net *net, int fd, int version, u32 tunnel_id,
Dl2tp_netlink.c165 int fd; in l2tp_nl_cmd_tunnel_create() local
195 fd = -1; in l2tp_nl_cmd_tunnel_create()
197 fd = nla_get_u32(info->attrs[L2TP_ATTR_FD]); in l2tp_nl_cmd_tunnel_create()
240 ret = l2tp_tunnel_create(net, fd, proto_version, tunnel_id, in l2tp_nl_cmd_tunnel_create()
/net/core/
Dbpf_sk_storage.c704 int fd, err; in bpf_fd_sk_storage_lookup_elem() local
706 fd = *(int *)key; in bpf_fd_sk_storage_lookup_elem()
707 sock = sockfd_lookup(fd, &err); in bpf_fd_sk_storage_lookup_elem()
722 int fd, err; in bpf_fd_sk_storage_update_elem() local
724 fd = *(int *)key; in bpf_fd_sk_storage_update_elem()
725 sock = sockfd_lookup(fd, &err); in bpf_fd_sk_storage_update_elem()
738 int fd, err; in bpf_fd_sk_storage_delete_elem() local
740 fd = *(int *)key; in bpf_fd_sk_storage_delete_elem()
741 sock = sockfd_lookup(fd, &err); in bpf_fd_sk_storage_delete_elem()
Dscm.c101 int fd = fdp[i]; in scm_fp_copy() local
104 if (fd < 0 || !(file = fget_raw(fd))) in scm_fp_copy()
Dlwt_bpf.c339 u32 fd; in bpf_parse_prog() local
353 fd = nla_get_u32(tb[LWT_BPF_PROG_FD]); in bpf_parse_prog()
354 p = bpf_prog_get_type(fd, type); in bpf_parse_prog()
Dnet_namespace.c646 struct net *get_net_ns_by_fd(int fd) in get_net_ns_by_fd() argument
652 file = proc_ns_fget(fd); in get_net_ns_by_fd()
667 struct net *get_net_ns_by_fd(int fd) in get_net_ns_by_fd() argument
Dsock_map.c67 struct fd f; in sock_map_get_from_fd()
Ddev.c8387 int fd, u32 flags) in dev_change_xdp_fd() argument
8411 if (fd >= 0) { in dev_change_xdp_fd()
8425 prog = bpf_prog_get_type_dev(fd, BPF_PROG_TYPE_XDP, in dev_change_xdp_fd()
/net/netfilter/
Dxt_bpf.c43 static int __bpf_mt_check_fd(int fd, struct bpf_prog **ret) in __bpf_mt_check_fd() argument
47 prog = bpf_prog_get_type(fd, BPF_PROG_TYPE_SOCKET_FILTER); in __bpf_mt_check_fd()
82 return __bpf_mt_check_fd(info->fd, &info->filter); in bpf_mt_check_v1()
/net/9p/
Dtrans_fd.c723 if (clnt->trans_opts.fd.rfd != ~0) in p9_fd_show_options()
724 seq_printf(m, ",rfd=%u", clnt->trans_opts.fd.rfd); in p9_fd_show_options()
725 if (clnt->trans_opts.fd.wfd != ~0) in p9_fd_show_options()
726 seq_printf(m, ",wfd=%u", clnt->trans_opts.fd.wfd); in p9_fd_show_options()
1043 client->trans_opts.fd.rfd = opts.rfd; in p9_fd_create()
1044 client->trans_opts.fd.wfd = opts.wfd; in p9_fd_create()
/net/sched/
Dsch_atm.c205 int fd, error, hdr_len; in atm_tc_change() local
234 fd = nla_get_u32(tb[TCA_ATM_FD]); in atm_tc_change()
235 pr_debug("atm_tc_change: fd %d\n", fd); in atm_tc_change()
253 sock = sockfd_lookup(fd, &error); in atm_tc_change()
/net/kcm/
Dkcmsock.c1481 csock = sockfd_lookup(info->fd, &err); in kcm_attach_ioctl()
1610 csock = sockfd_lookup(info->fd, &err); in kcm_unattach_ioctl()
1715 info.fd = get_unused_fd_flags(0); in kcm_ioctl()
1716 if (unlikely(info.fd < 0)) in kcm_ioctl()
1717 return info.fd; in kcm_ioctl()
1721 put_unused_fd(info.fd); in kcm_ioctl()
1726 put_unused_fd(info.fd); in kcm_ioctl()
1730 fd_install(info.fd, file); in kcm_ioctl()
/net/ipv6/
Dseg6_local.c832 u32 fd; in parse_nla_bpf() local
847 fd = nla_get_u32(tb[SEG6_LOCAL_BPF_PROG]); in parse_nla_bpf()
848 p = bpf_prog_get_type(fd, BPF_PROG_TYPE_LWT_SEG6LOCAL); in parse_nla_bpf()
/net/unix/
Daf_unix.c2537 int fd; in unix_open_file() local
2551 fd = get_unused_fd_flags(O_CLOEXEC); in unix_open_file()
2552 if (fd < 0) in unix_open_file()
2557 put_unused_fd(fd); in unix_open_file()
2558 fd = PTR_ERR(f); in unix_open_file()
2562 fd_install(fd, f); in unix_open_file()
2566 return fd; in unix_open_file()
/net/sunrpc/
Dsvcsock.c1314 bool svc_alien_sock(struct net *net, int fd) in svc_alien_sock() argument
1317 struct socket *sock = sockfd_lookup(fd, &err); in svc_alien_sock()
1342 int svc_addsock(struct svc_serv *serv, const int fd, char *name_return, in svc_addsock() argument
1346 struct socket *so = sockfd_lookup(fd, &err); in svc_addsock()
/net/xdp/
Dxsk.c574 static struct socket *xsk_lookup_xsk_from_fd(int fd) in xsk_lookup_xsk_from_fd() argument
579 sock = sockfd_lookup(fd, &err); in xsk_lookup_xsk_from_fd()
/net/packet/
Daf_packet.c1564 u32 fd; in fanout_set_data_ebpf() local
1568 if (len != sizeof(fd)) in fanout_set_data_ebpf()
1570 if (copy_from_user(&fd, data, len)) in fanout_set_data_ebpf()
1573 new = bpf_prog_get_type(fd, BPF_PROG_TYPE_SOCKET_FILTER); in fanout_set_data_ebpf()
/net/ieee802154/
Dnl802154.c1275 u32 fd = nla_get_u32(info->attrs[NL802154_ATTR_NETNS_FD]); in nl802154_wpan_phy_netns() local
1277 net = get_net_ns_by_fd(fd); in nl802154_wpan_phy_netns()
/net/wireless/
Dnl80211.c10234 u32 fd = nla_get_u32(info->attrs[NL80211_ATTR_NETNS_FD]); in nl80211_wiphy_netns() local
10236 net = get_net_ns_by_fd(fd); in nl80211_wiphy_netns()