/systemd/src/basic/ |
H A D | socket-util.h | 136 #define CMSG_FOREACH(cmsg, mh) \ 137 for ((cmsg) = CMSG_FIRSTHDR(mh); (cmsg); (cmsg) = CMSG_NXTHDR((mh), (cmsg)))
|
H A D | fd-util.c | 324 struct cmsghdr *cmsg; local 328 CMSG_FOREACH(cmsg, mh) 329 if (cmsg->cmsg_level == SOL_SOCKET && cmsg->cmsg_type == SCM_RIGHTS) 330 close_many((int*) CMSG_DATA(cmsg), (cmsg->cmsg_len - CMSG_LEN(0)) / sizeof(int));
|
H A D | socket-util.c | 880 struct cmsghdr *cmsg; local 885 cmsg = CMSG_FIRSTHDR(&mh); 886 cmsg->cmsg_level = SOL_SOCKET; 887 cmsg->cmsg_type = SCM_RIGHTS; 888 cmsg->cmsg_len = CMSG_LEN(sizeof(int)); 889 memcpy(CMSG_DATA(cmsg), &fd, sizeof(int)); 907 struct cmsghdr *cmsg, *found = NULL; local 922 CMSG_FOREACH(cmsg, &mh) { 923 if (cmsg->cmsg_level == SOL_SOCKET && 924 cmsg [all...] |
/systemd/src/libsystemd/sd-daemon/ |
H A D | sd-daemon.c | 417 struct cmsghdr *cmsg = NULL; local 475 cmsg = CMSG_FIRSTHDR(&msghdr); 477 cmsg->cmsg_level = SOL_SOCKET; 478 cmsg->cmsg_type = SCM_RIGHTS; 479 cmsg->cmsg_len = CMSG_LEN(sizeof(int) * n_fds); 481 memcpy(CMSG_DATA(cmsg), fds, sizeof(int) * n_fds); 484 assert_se(cmsg = CMSG_NXTHDR(&msghdr, cmsg)); 490 cmsg->cmsg_level = SOL_SOCKET; 491 cmsg [all...] |
/systemd/src/libsystemd/sd-bus/ |
H A D | bus-container.c | 162 struct cmsghdr *cmsg; local 246 CMSG_FOREACH(cmsg, &mh) { 247 if (cmsg->cmsg_level == SOL_SOCKET && cmsg->cmsg_type == SCM_RIGHTS) { 253 fds = (int*) CMSG_DATA(cmsg); 254 n_fds = (cmsg->cmsg_len - CMSG_LEN(0)) / sizeof(int);
|
H A D | bus-socket.c | 564 struct cmsghdr *cmsg; local 566 CMSG_FOREACH(cmsg, &mh) 567 if (cmsg->cmsg_level == SOL_SOCKET && 568 cmsg->cmsg_type == SCM_RIGHTS) { 574 j = (cmsg->cmsg_len - CMSG_LEN(0)) / sizeof(int); 575 close_many((int*) CMSG_DATA(cmsg), j); 579 cmsg->cmsg_level, cmsg->cmsg_type); 977 struct cmsghdr *cmsg; local 979 CMSG_FOREACH(cmsg, [all...] |
/systemd/src/resolve/ |
H A D | resolved-dns-stream.c | 72 struct cmsghdr *cmsg; local 118 CMSG_FOREACH(cmsg, &mh) { 120 if (cmsg->cmsg_level == IPPROTO_IPV6) { 123 switch (cmsg->cmsg_type) { 126 struct in6_pktinfo *i = (struct in6_pktinfo*) CMSG_DATA(cmsg); 134 s->ttl = *(int *) CMSG_DATA(cmsg); 138 } else if (cmsg->cmsg_level == IPPROTO_IP) { 141 switch (cmsg->cmsg_type) { 144 struct in_pktinfo *i = (struct in_pktinfo*) CMSG_DATA(cmsg); 152 s->ttl = *(int *) CMSG_DATA(cmsg); [all...] |
H A D | resolved-manager.c | 618 struct cmsghdr *cmsg; local 675 CMSG_FOREACH(cmsg, &mh) { 677 if (cmsg->cmsg_level == IPPROTO_IPV6) { 680 switch (cmsg->cmsg_type) { 683 struct in6_pktinfo *i = (struct in6_pktinfo*) CMSG_DATA(cmsg); 693 p->ttl = *(int *) CMSG_DATA(cmsg); 697 } else if (cmsg->cmsg_level == IPPROTO_IP) { 700 switch (cmsg->cmsg_type) { 703 struct in_pktinfo *i = (struct in_pktinfo*) CMSG_DATA(cmsg); 713 p->ttl = *(int *) CMSG_DATA(cmsg); 828 struct cmsghdr *cmsg; local 878 struct cmsghdr *cmsg; local [all...] |
/systemd/src/libsystemd/sd-netlink/ |
H A D | netlink-socket.c | 269 struct cmsghdr *cmsg; local 301 CMSG_FOREACH(cmsg, &msg) { 302 if (cmsg->cmsg_level == SOL_NETLINK && 303 cmsg->cmsg_type == NETLINK_PKTINFO && 304 cmsg->cmsg_len == CMSG_LEN(sizeof(struct nl_pktinfo))) { 305 struct nl_pktinfo *pktinfo = (void *)CMSG_DATA(cmsg);
|
/systemd/src/journal/ |
H A D | journald-syslog.c | 58 struct cmsghdr *cmsg; local 73 cmsg = CMSG_FIRSTHDR(&msghdr); 74 cmsg->cmsg_level = SOL_SOCKET; 75 cmsg->cmsg_type = SCM_CREDENTIALS; 76 cmsg->cmsg_len = CMSG_LEN(sizeof(struct ucred)); 77 memcpy(CMSG_DATA(cmsg), ucred, sizeof(struct ucred)); 78 msghdr.msg_controllen = cmsg->cmsg_len; 104 memcpy(CMSG_DATA(cmsg), &u, sizeof(struct ucred));
|
H A D | journald-server.c | 1156 struct cmsghdr *cmsg; local 1223 CMSG_FOREACH(cmsg, &msghdr) { 1225 if (cmsg->cmsg_level == SOL_SOCKET && 1226 cmsg->cmsg_type == SCM_CREDENTIALS && 1227 cmsg->cmsg_len == CMSG_LEN(sizeof(struct ucred))) 1228 ucred = (struct ucred*) CMSG_DATA(cmsg); 1229 else if (cmsg->cmsg_level == SOL_SOCKET && 1230 cmsg->cmsg_type == SCM_SECURITY) { 1231 label = (char*) CMSG_DATA(cmsg); 1232 label_len = cmsg [all...] |
H A D | journald-stream.c | 750 struct cmsghdr *cmsg; local 765 cmsg = CMSG_FIRSTHDR(&msghdr); 766 cmsg->cmsg_level = SOL_SOCKET; 767 cmsg->cmsg_type = SCM_RIGHTS; 768 cmsg->cmsg_len = CMSG_LEN(sizeof(int)); 770 memcpy(CMSG_DATA(cmsg), &s->fd, sizeof(int));
|
/systemd/src/libsystemd-network/ |
H A D | sd-dhcp-server.c | 303 struct cmsghdr *cmsg; local 312 cmsg = CMSG_FIRSTHDR(&msg); 313 assert(cmsg); 315 cmsg->cmsg_level = IPPROTO_IP; 316 cmsg->cmsg_type = IP_PKTINFO; 317 cmsg->cmsg_len = CMSG_LEN(sizeof(struct in_pktinfo)); 323 pktinfo = (struct in_pktinfo*) CMSG_DATA(cmsg); 957 struct cmsghdr *cmsg; local 983 CMSG_FOREACH(cmsg, &msg) { 984 if (cmsg [all...] |
H A D | sd-ndisc.c | 491 struct cmsghdr *cmsg; local 536 CMSG_FOREACH(cmsg, &msg) { 537 if (cmsg->cmsg_level == SOL_IPV6 && 538 cmsg->cmsg_type == IPV6_HOPLIMIT && 539 cmsg->cmsg_len == CMSG_LEN(sizeof(int))) { 540 int hops = *(int*)CMSG_DATA(cmsg);
|
H A D | sd-dhcp-client.c | 1617 struct cmsghdr *cmsg; local 1649 CMSG_FOREACH(cmsg, &msg) { 1650 if (cmsg->cmsg_level == SOL_PACKET && 1651 cmsg->cmsg_type == PACKET_AUXDATA && 1652 cmsg->cmsg_len == CMSG_LEN(sizeof(struct tpacket_auxdata))) { 1653 struct tpacket_auxdata *aux = (struct tpacket_auxdata*)CMSG_DATA(cmsg);
|
/systemd/src/udev/ |
H A D | udev-ctrl.c | 327 struct cmsghdr *cmsg; local 382 cmsg = CMSG_FIRSTHDR(&smsg); 384 if (cmsg == NULL || cmsg->cmsg_type != SCM_CREDENTIALS) { 389 cred = (struct ucred *) CMSG_DATA(cmsg);
|
H A D | udevd.c | 861 struct cmsghdr *cmsg; local 880 CMSG_FOREACH(cmsg, &msghdr) { 881 if (cmsg->cmsg_level == SOL_SOCKET && 882 cmsg->cmsg_type == SCM_CREDENTIALS && 883 cmsg->cmsg_len == CMSG_LEN(sizeof(struct ucred))) 884 ucred = (struct ucred*) CMSG_DATA(cmsg);
|
/systemd/src/libudev/ |
H A D | libudev-monitor.c | 588 struct cmsghdr *cmsg; local 639 cmsg = CMSG_FIRSTHDR(&smsg); 640 if (cmsg == NULL || cmsg->cmsg_type != SCM_CREDENTIALS) { 645 cred = (struct ucred *)CMSG_DATA(cmsg);
|
/systemd/src/coredump/ |
H A D | coredump.c | 774 struct cmsghdr *cmsg, *found = NULL; local 779 CMSG_FOREACH(cmsg, &mh) { 780 if (cmsg->cmsg_level == SOL_SOCKET && 781 cmsg->cmsg_type == SCM_RIGHTS && 782 cmsg->cmsg_len == CMSG_LEN(sizeof(int))) { 784 found = cmsg;
|
/systemd/src/import/ |
H A D | importd.c | 579 struct cmsghdr *cmsg; local 597 CMSG_FOREACH(cmsg, &msghdr) 598 if (cmsg->cmsg_level == SOL_SOCKET && 599 cmsg->cmsg_type == SCM_CREDENTIALS && 600 cmsg->cmsg_len == CMSG_LEN(sizeof(struct ucred))) 601 ucred = (struct ucred*) CMSG_DATA(cmsg);
|
/systemd/src/timesync/ |
H A D | timesyncd-manager.c | 494 struct cmsghdr *cmsg; local 535 CMSG_FOREACH(cmsg, &msghdr) { 536 if (cmsg->cmsg_level != SOL_SOCKET) 539 switch (cmsg->cmsg_type) { 541 recv_time = (struct timespec *) CMSG_DATA(cmsg);
|
/systemd/src/core/ |
H A D | manager.c | 1537 struct cmsghdr *cmsg; local 1561 CMSG_FOREACH(cmsg, &msghdr) { 1562 if (cmsg->cmsg_level == SOL_SOCKET && cmsg->cmsg_type == SCM_RIGHTS) { 1564 fd_array = (int*) CMSG_DATA(cmsg); 1565 n_fds = (cmsg->cmsg_len - CMSG_LEN(0)) / sizeof(int); 1567 } else if (cmsg->cmsg_level == SOL_SOCKET && 1568 cmsg->cmsg_type == SCM_CREDENTIALS && 1569 cmsg->cmsg_len == CMSG_LEN(sizeof(struct ucred))) { 1571 ucred = (struct ucred*) CMSG_DATA(cmsg); [all...] |