Searched refs:cm (Results 1 – 11 of 11) sorted by relevance
/tools/perf/util/ |
D | clockid.c | 71 const struct clockid_map *cm; in parse_clockid() local 97 for (cm = clockids; cm->name; cm++) { in parse_clockid() 98 if (!strcasecmp(str, cm->name)) { in parse_clockid() 99 opts->clockid = cm->clockid; in parse_clockid() 112 const struct clockid_map *cm; in clockid_name() local 114 for (cm = clockids; cm->name; cm++) { in clockid_name() 115 if (cm->clockid == clk_id) in clockid_name() 116 return cm->name; in clockid_name()
|
/tools/testing/selftests/net/ |
D | ipv6_flowlabel.c | 52 struct cmsghdr *cm; in do_send() local 54 cm = (void *)control; in do_send() 55 cm->cmsg_len = CMSG_LEN(sizeof(flowlabel)); in do_send() 56 cm->cmsg_level = SOL_IPV6; in do_send() 57 cm->cmsg_type = IPV6_FLOWINFO; in do_send() 58 *(uint32_t *)CMSG_DATA(cm) = htonl(flowlabel); in do_send() 80 struct cmsghdr *cm; in do_recv() local 104 cm = CMSG_FIRSTHDR(&msg); in do_recv() 106 if (!cm) in do_recv() 108 if (CMSG_NXTHDR(&msg, cm)) in do_recv() [all …]
|
D | tcp_inq.c | 103 struct cmsghdr *cm; in main() local 166 for (cm = CMSG_FIRSTHDR(&msg); cm; cm = CMSG_NXTHDR(&msg, cm)) in main() 167 if (cm->cmsg_level == SOL_TCP && cm->cmsg_type == TCP_CM_INQ) in main() 168 inq = *((int *) CMSG_DATA(cm)); in main()
|
D | txtimestamp.c | 312 struct cmsghdr *cm; in __recv_errmsg_cmsg() local 315 for (cm = CMSG_FIRSTHDR(msg); in __recv_errmsg_cmsg() 316 cm && cm->cmsg_len; in __recv_errmsg_cmsg() 317 cm = CMSG_NXTHDR(msg, cm)) { in __recv_errmsg_cmsg() 318 if (cm->cmsg_level == SOL_SOCKET && in __recv_errmsg_cmsg() 319 cm->cmsg_type == SCM_TIMESTAMPING) { in __recv_errmsg_cmsg() 320 tss = (void *) CMSG_DATA(cm); in __recv_errmsg_cmsg() 321 } else if ((cm->cmsg_level == SOL_IP && in __recv_errmsg_cmsg() 322 cm->cmsg_type == IP_RECVERR) || in __recv_errmsg_cmsg() 323 (cm->cmsg_level == SOL_IPV6 && in __recv_errmsg_cmsg() [all …]
|
D | so_txtime.c | 78 struct cmsghdr *cm; in do_send_one() local 99 cm = CMSG_FIRSTHDR(&msg); in do_send_one() 100 cm->cmsg_level = SOL_SOCKET; in do_send_one() 101 cm->cmsg_type = SCM_TXTIME; in do_send_one() 102 cm->cmsg_len = CMSG_LEN(sizeof(tdeliver)); in do_send_one() 103 memcpy(CMSG_DATA(cm), &tdeliver, sizeof(tdeliver)); in do_send_one() 161 struct cmsghdr *cm; in do_recv_errqueue_timeout() local 184 cm = CMSG_FIRSTHDR(&msg); in do_recv_errqueue_timeout() 185 if (cm->cmsg_level != cfg_errq_level || in do_recv_errqueue_timeout() 186 cm->cmsg_type != cfg_errq_type) in do_recv_errqueue_timeout() [all …]
|
D | msg_zerocopy.c | 172 struct cmsghdr *cm; in add_zcopy_cookie() local 176 cm = (void *)msg->msg_control; in add_zcopy_cookie() 177 cm->cmsg_len = CMSG_LEN(sizeof(cookie)); in add_zcopy_cookie() 178 cm->cmsg_level = SOL_RDS; in add_zcopy_cookie() 179 cm->cmsg_type = RDS_CMSG_ZCOPY_COOKIE; in add_zcopy_cookie() 180 memcpy(CMSG_DATA(cm), &cookie, sizeof(cookie)); in add_zcopy_cookie() 396 struct cmsghdr *cm; in do_recv_completion() local 415 cm = CMSG_FIRSTHDR(&msg); in do_recv_completion() 416 if (!cm) in do_recv_completion() 418 if (!((cm->cmsg_level == SOL_IP && cm->cmsg_type == IP_RECVERR) || in do_recv_completion() [all …]
|
D | nettest.c | 836 struct cmsghdr *cm; in get_index_from_cmsg() local 840 for (cm = (struct cmsghdr *)CMSG_FIRSTHDR(m); in get_index_from_cmsg() 841 m->msg_controllen != 0 && cm; in get_index_from_cmsg() 842 cm = (struct cmsghdr *)CMSG_NXTHDR(m, cm)) { in get_index_from_cmsg() 844 if (cm->cmsg_level == SOL_IP && in get_index_from_cmsg() 845 cm->cmsg_type == IP_PKTINFO) { in get_index_from_cmsg() 848 pi = (struct in_pktinfo *)(CMSG_DATA(cm)); in get_index_from_cmsg() 851 } else if (cm->cmsg_level == SOL_IPV6 && in get_index_from_cmsg() 852 cm->cmsg_type == IPV6_PKTINFO) { in get_index_from_cmsg() 855 pi6 = (struct in6_pktinfo *)(CMSG_DATA(cm)); in get_index_from_cmsg() [all …]
|
D | udpgso_bench_tx.c | 314 static void send_ts_cmsg(struct cmsghdr *cm) in send_ts_cmsg() argument 318 cm->cmsg_level = SOL_SOCKET; in send_ts_cmsg() 319 cm->cmsg_type = SO_TIMESTAMPING; in send_ts_cmsg() 320 cm->cmsg_len = CMSG_LEN(sizeof(cfg_tx_ts)); in send_ts_cmsg() 321 valp = (void *)CMSG_DATA(cm); in send_ts_cmsg() 378 static void send_udp_segment_cmsg(struct cmsghdr *cm) in send_udp_segment_cmsg() argument 382 cm->cmsg_level = SOL_UDP; in send_udp_segment_cmsg() 383 cm->cmsg_type = UDP_SEGMENT; in send_udp_segment_cmsg() 384 cm->cmsg_len = CMSG_LEN(sizeof(cfg_gso_size)); in send_udp_segment_cmsg() 385 valp = (void *)CMSG_DATA(cm); in send_udp_segment_cmsg()
|
D | udpgso.c | 457 struct cmsghdr *cm; in send_one() local 472 cm = CMSG_FIRSTHDR(&msg); in send_one() 473 cm->cmsg_level = SOL_UDP; in send_one() 474 cm->cmsg_type = UDP_SEGMENT; in send_one() 475 cm->cmsg_len = CMSG_LEN(sizeof(uint16_t)); in send_one() 476 *((uint16_t *) CMSG_DATA(cm)) = gso_len; in send_one()
|
D | timestamping.c | 285 struct cmsghdr cm; in recvpacket() member
|
/tools/testing/selftests/bpf/prog_tests/ |
D | sk_lookup.c | 365 struct cmsghdr *cm; in udp_recv_send() local 389 for (cm = CMSG_FIRSTHDR(&msg); cm; cm = CMSG_NXTHDR(&msg, cm)) { in udp_recv_send() 390 if ((cm->cmsg_level == SOL_IP && in udp_recv_send() 391 cm->cmsg_type == IP_ORIGDSTADDR) || in udp_recv_send() 392 (cm->cmsg_level == SOL_IPV6 && in udp_recv_send() 393 cm->cmsg_type == IPV6_ORIGDSTADDR)) { in udp_recv_send() 394 dst_addr = (struct sockaddr_storage *)CMSG_DATA(cm); in udp_recv_send() 398 cm->cmsg_level, cm->cmsg_type); in udp_recv_send()
|