/tools/testing/selftests/bpf/prog_tests/ |
D | sockmap_ktls.c | 13 static int tcp_server(int family) in tcp_server() argument 17 s = socket(family, SOCK_STREAM, 0); in tcp_server() 36 static void test_sockmap_ktls_disconnect_after_delete(int family, int map) in test_sockmap_ktls_disconnect_after_delete() argument 42 srv = tcp_server(family); in test_sockmap_ktls_disconnect_after_delete() 50 cli = socket(family, SOCK_STREAM, 0); in test_sockmap_ktls_disconnect_after_delete() 79 static void test_sockmap_ktls_update_fails_when_sock_has_ulp(int family, int map) in test_sockmap_ktls_update_fails_when_sock_has_ulp() argument 87 switch (family) { in test_sockmap_ktls_update_fails_when_sock_has_ulp() 97 PRINT_FAIL("unsupported socket family %d", family); in test_sockmap_ktls_update_fails_when_sock_has_ulp() 101 s = socket(family, SOCK_STREAM, 0); in test_sockmap_ktls_update_fails_when_sock_has_ulp() 135 static const char *fmt_test_name(const char *subtest_name, int family, in fmt_test_name() argument [all …]
|
D | sockmap_listen.c | 33 int family, int sotype, int mapfd) in test_insert_invalid() argument 51 int family, int sotype, int mapfd) in test_insert_opened() argument 57 s = xsocket(family, sotype, 0); in test_insert_opened() 73 int family, int sotype, int mapfd) in test_insert_bound() argument 81 init_addr_loopback(family, &addr, &len); in test_insert_bound() 83 s = xsocket(family, sotype, 0); in test_insert_bound() 101 int family, int sotype, int mapfd) in test_insert() argument 107 s = socket_loopback(family, sotype); in test_insert() 118 int family, int sotype, int mapfd) in test_delete_after_insert() argument 124 s = socket_loopback(family, sotype); in test_delete_after_insert() [all …]
|
D | select_reuseport.c | 49 sa_family_t family; member 140 static void sa46_init_loopback(union sa46 *sa, sa_family_t family) in sa46_init_loopback() argument 143 sa->family = family; in sa46_init_loopback() 144 if (sa->family == AF_INET6) in sa46_init_loopback() 150 static void sa46_init_inany(union sa46 *sa, sa_family_t family) in sa46_init_inany() argument 153 sa->family = family; in sa46_init_inany() 154 if (sa->family == AF_INET6) in sa46_init_inany() 237 static void check_data(int type, sa_family_t family, const struct cmd *cmd, in check_data() argument 263 if (family == AF_INET6) { in check_data() 374 static int send_data(int type, sa_family_t family, void *data, size_t len, in send_data() argument [all …]
|
D | setget_sockopt.c | 42 static void test_tcp(int family) in test_tcp() argument 49 sfd = start_server(family, SOCK_STREAM, in test_tcp() 50 family == AF_INET6 ? addr6_str : addr4_str, 0, 0); in test_tcp() 70 static void test_udp(int family) in test_udp() argument 77 sfd = start_server(family, SOCK_DGRAM, in test_udp() 78 family == AF_INET6 ? addr6_str : addr4_str, 0, 0); in test_udp() 87 static void test_ktls(int family) in test_ktls() argument 96 sfd = start_server(family, SOCK_STREAM, in test_ktls() 97 family == AF_INET6 ? addr6_str : addr4_str, 0, 0); in test_ktls()
|
D | connect_ping.c | 21 int family, int do_bind) in subtest() argument 36 switch (family) { in subtest() 52 sock_fd = socket(family, SOCK_DGRAM, protocol); in subtest() 59 if (!ASSERT_EQ(skel->bss->invocations_v4, family == AF_INET ? 1 : 0, in subtest() 62 if (!ASSERT_EQ(skel->bss->invocations_v6, family == AF_INET6 ? 1 : 0, in subtest() 72 switch (family) { in subtest() 74 if (!ASSERT_EQ(sa4.sin_family, family, "sin_family")) in subtest()
|
D | sockmap_helpers.h | 115 #define xsocket(family, sotype, flags) \ argument 117 int __ret = socket(family, sotype, flags); \ 275 static inline void init_addr_loopback(int family, struct sockaddr_storage *ss, in init_addr_loopback() argument 278 switch (family) { in init_addr_loopback() 289 FAIL("unsupported address family %d", family); in init_addr_loopback() 315 static inline int create_pair(int s, int family, int sotype, int *c, int *p) in create_pair() argument 326 *c = xsocket(family, sotype, 0); in create_pair() 346 static inline int create_socket_pairs(int s, int family, int sotype, in create_socket_pairs() argument 351 err = create_pair(s, family, sotype, c0, p0); in create_socket_pairs() 355 err = create_pair(s, family, sotype, c1, p1); in create_socket_pairs() [all …]
|
D | bind_perm.c | 22 void try_bind(int family, int port, int expected_errno) in try_bind() argument 29 fd = socket(family, SOCK_STREAM, 0); in try_bind() 33 if (family == AF_INET) { in try_bind() 35 sin->sin_family = family; in try_bind() 39 sin6->sin6_family = family; in try_bind()
|
D | xdp.c | 7 struct vip key4 = {.protocol = 6, .family = AF_INET}; in test_xdp() 8 struct vip key6 = {.protocol = 6, .family = AF_INET6}; in test_xdp() 9 struct iptnl_info value4 = {.family = AF_INET}; in test_xdp() 10 struct iptnl_info value6 = {.family = AF_INET6}; in test_xdp()
|
/tools/net/ynl/lib/ |
D | nlspec.py | 31 def __init__(self, family, yaml): argument 33 self.family = family 40 family.add_unresolved(self) 75 super().__init__(enum_set.family, yaml) 113 def __init__(self, family, yaml): argument 114 super().__init__(family, yaml) 161 def __init__(self, family, attr_set, yaml, value): argument 162 super().__init__(family, yaml) 187 def __init__(self, family, yaml): argument 188 super().__init__(family, yaml) [all …]
|
/tools/testing/selftests/net/ |
D | reuseport_addr_any.c | 34 static void build_rcv_fd(int family, int proto, int *rcv_fds, int count, in build_rcv_fd() argument 44 switch (family) { in build_rcv_fd() 46 addr4.sin_family = family; in build_rcv_fd() 49 else if (!inet_pton(family, addr_str, &addr4.sin_addr.s_addr)) in build_rcv_fd() 59 else if (!inet_pton(family, addr_str, &addr6.sin6_addr)) in build_rcv_fd() 66 error(1, 0, "Unsupported family %d", family); in build_rcv_fd() 75 rcv_fds[i] = socket(family, proto, 0); in build_rcv_fd() 101 static int connect_and_send(int family, int proto) in connect_and_send() argument 110 switch (family) { in connect_and_send() 117 if (!inet_pton(family, IP4_ADDR, &daddr4.sin_addr.s_addr)) in connect_and_send() [all …]
|
D | reuseport_bpf_cpu.c | 34 static void build_rcv_group(int *rcv_fd, size_t len, int family, int proto) in build_rcv_group() argument 42 switch (family) { in build_rcv_group() 56 error(1, 0, "Unsupported family %d", family); in build_rcv_group() 60 rcv_fd[i] = socket(family, proto, 0); in build_rcv_group() 94 static void send_from_cpu(int cpu_id, int family, int proto) in send_from_cpu() argument 102 switch (family) { in send_from_cpu() 126 error(1, 0, "Unsupported family %d", family); in send_from_cpu() 134 fd = socket(family, proto, 0); in send_from_cpu() 184 static void test(int *rcv_fd, int len, int family, int proto) in test() argument 189 build_rcv_group(rcv_fd, len, family, proto); in test() [all …]
|
D | tcp_inq.c | 32 static int family = AF_INET6; variable 36 static void setup_loopback_addr(int family, struct sockaddr_storage *sockaddr) in setup_loopback_addr() argument 41 switch (family) { in setup_loopback_addr() 111 family = PF_INET; in main() 115 family = PF_INET6; in main() 124 server_fd = socket(family, SOCK_STREAM, 0); in main() 127 setup_loopback_addr(family, &listen_addr); in main() 140 fd = socket(family, SOCK_STREAM, 0); in main() 143 setup_loopback_addr(family, &addr); in main()
|
D | reuseport_bpf_numa.c | 30 static void build_rcv_group(int *rcv_fd, size_t len, int family, int proto) in build_rcv_group() argument 38 switch (family) { in build_rcv_group() 52 error(1, 0, "Unsupported family %d", family); in build_rcv_group() 56 rcv_fd[i] = socket(family, proto, 0); in build_rcv_group() 107 static void send_from_node(int node_id, int family, int proto) in send_from_node() argument 114 switch (family) { in send_from_node() 138 error(1, 0, "Unsupported family %d", family); in send_from_node() 144 fd = socket(family, proto, 0); in send_from_node() 194 static void test(int *rcv_fd, int len, int family, int proto) in test() argument 199 build_rcv_group(rcv_fd, len, family, proto); in test() [all …]
|
D | tcp_fastopen_backup_key.c | 89 static void build_rcv_fd(int family, int proto, int *rcv_fds) in build_rcv_fd() argument 98 switch (family) { in build_rcv_fd() 100 addr4.sin_family = family; in build_rcv_fd() 114 error(1, 0, "Unsupported family %d", family); in build_rcv_fd() 124 rcv_fds[i] = socket(family, proto, 0); in build_rcv_fd() 141 static int connect_and_send(int family, int proto) in connect_and_send() argument 151 switch (family) { in connect_and_send() 158 if (!inet_pton(family, IP4_ADDR, &daddr4.sin_addr.s_addr)) in connect_and_send() 171 if (!inet_pton(family, IP6_ADDR, &daddr6.sin6_addr)) in connect_and_send() 180 error(1, 0, "Unsupported family %d", family); in connect_and_send() [all …]
|
D | txtimestamp.c | 275 static void print_pktinfo(int family, int ifindex, void *saddr, void *daddr) in print_pktinfo() argument 281 saddr ? inet_ntop(family, saddr, sa, sizeof(sa)) : "unknown", in print_pktinfo() 282 daddr ? inet_ntop(family, daddr, da, sizeof(da)) : "unknown"); in print_pktinfo() 480 static void do_test(int family, unsigned int report_opt) in do_test() argument 499 if (family == PF_INET) in do_test() 515 fd = socket(cfg_use_pf_packet ? PF_PACKET : family, in do_test() 542 if (family == PF_INET) { in do_test() 552 if (family == AF_INET6) { in do_test() 585 if (family == PF_INET) in do_test() 591 fill_header_udp(buf + off, family == PF_INET); in do_test() [all …]
|
/tools/testing/selftests/bpf/progs/ |
D | lsm_cgroup.c | 51 static __always_inline int real_create(struct socket *sock, int family, in real_create() argument 58 if (family == AF_PACKET && protocol != 0) in real_create() 85 int BPF_PROG(socket_post_create, struct socket *sock, int family, in BPF_PROG() argument 89 return real_create(sock, family, protocol); in BPF_PROG() 94 int BPF_PROG(socket_post_create2, struct socket *sock, int family, in BPF_PROG() argument 98 return real_create(sock, family, protocol); in BPF_PROG() 148 int BPF_PROG(socket_alloc, struct sock *sk, int family, gfp_t priority) in BPF_PROG() argument 155 if (family == AF_UNIX) in BPF_PROG()
|
D | mptcpify.c | 11 int BPF_PROG(mptcpify, int family, int type, int protocol) in BPF_PROG() argument 13 if ((family == AF_INET || family == AF_INET6) && in BPF_PROG()
|
D | bind_perm.c | 10 static __always_inline int bind_prog(struct bpf_sock_addr *ctx, int family) in bind_prog() argument 18 if (sk->family != family) in bind_prog()
|
/tools/net/ynl/ |
D | ynl-gen-c.py | 37 def __init__(self, family, attr_set, attr, value): argument 38 super().__init__(family, attr_set, attr, value) 49 if self.nested_attrs == family.name: 54 if self.nested_attrs in self.family.consts: 258 def __init__(self, family, attr_set, attr, value): argument 259 super().__init__(family, attr_set, attr, value) 277 self.is_bitfield = self.family.consts[self.attr['enum']]['type'] == 'flags' 282 if maybe_enum and self.family.consts[self.attr['enum']].enum_name: 297 enum = self.family.consts[self.attr['enum']] 300 flags = self.family.consts[self.checks['flags-mask']] [all …]
|
/tools/testing/selftests/netfilter/ |
D | nft_nat.sh | 176 local family=$1 180 if [ $family = "inet" ];then 185 table $family nat { 193 echo "SKIP: Could not add add $family dnat hook" 243 test $lret -eq 0 && echo "PASS: ipv6 ping to $ns1 was $family NATted to $ns2" 251 local family=$1 255 if [ $family = "inet" ];then 260 table $family nat { 268 if [ $family = "inet" ];then 273 echo "SKIP: Could not add add $family dnat hook" [all …]
|
/tools/testing/selftests/bpf/ |
D | network_helpers.h | 46 int start_server(int family, int type, const char *addr, __u16 port, 48 int start_mptcp_server(int family, const char *addr, __u16 port, 50 int *start_reuseport_server(int family, int type, const char *addr_str, 59 int make_sockaddr(int family, const char *addr_str, __u16 port, 61 char *ping_command(int family);
|
D | network_helpers.c | 120 static int start_server_proto(int family, int type, int protocol, in start_server_proto() argument 126 if (make_sockaddr(family, addr_str, port, &addr, &addrlen)) in start_server_proto() 133 int start_server(int family, int type, const char *addr_str, __u16 port, in start_server() argument 136 return start_server_proto(family, type, 0, addr_str, port, timeout_ms); in start_server() 139 int start_mptcp_server(int family, const char *addr_str, __u16 port, in start_mptcp_server() argument 142 return start_server_proto(family, SOCK_STREAM, IPPROTO_MPTCP, addr_str, in start_mptcp_server() 146 int *start_reuseport_server(int family, int type, const char *addr_str, in start_reuseport_server() argument 157 if (make_sockaddr(family, addr_str, port, &addr, &addrlen)) in start_reuseport_server() 352 int make_sockaddr(int family, const char *addr_str, __u16 port, in make_sockaddr() argument 355 if (family == AF_INET) { in make_sockaddr() [all …]
|
/tools/perf/arch/x86/util/ |
D | header.c | 29 int family = -1, model = -1, step = -1; in __get_cpuid() local 38 family = (a >> 8) & 0xf; /* bits 11 - 8 */ in __get_cpuid() 43 if (family == 0xf) in __get_cpuid() 44 family += (a >> 20) & 0xff; in __get_cpuid() 47 if (family >= 0x6) in __get_cpuid() 50 nb = scnprintf(buffer, sz, fmt, vendor, family, model, step); in __get_cpuid()
|
/tools/power/cpupower/utils/helpers/ |
D | cpuid.c | 57 cpu_info->family = unknown; in get_cpu_info() 86 &cpu_info->family); in get_cpu_info() 96 cpu_info->family == unknown || in get_cpu_info() 135 if (cpu_info->family >= 0x17) in get_cpu_info() 140 cpu_info->family != 0x14) { in get_cpu_info() 144 if (cpu_info->family >= 0x17) in get_cpu_info() 179 if (cpu_info->family == 6) { in get_cpu_info()
|
/tools/testing/selftests/net/af_unix/ |
D | unix_connect.c | 18 int family; in FIXTURE() local 104 self->family = AF_UNIX; in FIXTURE_SETUP() 120 .sun_family = self->family, in TEST_F() 124 self->server = socket(self->family, variant->type, 0); in TEST_F() 141 self->client = socket(self->family, variant->type, 0); in TEST_F()
|