Home
last modified time | relevance | path

Searched refs:msghdr (Results 1 – 25 of 34) sorted by relevance

12

/systemd-251/src/libsystemd/sd-daemon/
Dsd-daemon.c446 struct msghdr msghdr = { in sd_pid_notify_with_fds() local
474 msghdr.msg_namelen = r; in sd_pid_notify_with_fds()
493 msghdr.msg_controllen = in sd_pid_notify_with_fds()
497 msghdr.msg_control = alloca0(msghdr.msg_controllen); in sd_pid_notify_with_fds()
499 cmsg = CMSG_FIRSTHDR(&msghdr); in sd_pid_notify_with_fds()
508 assert_se(cmsg = CMSG_NXTHDR(&msghdr, cmsg)); in sd_pid_notify_with_fds()
526 if (sendmsg(fd, &msghdr, MSG_NOSIGNAL) >= 0) { in sd_pid_notify_with_fds()
533 msghdr.msg_controllen -= CMSG_SPACE(sizeof(struct ucred)); in sd_pid_notify_with_fds()
534 if (msghdr.msg_controllen == 0) in sd_pid_notify_with_fds()
535 msghdr.msg_control = NULL; in sd_pid_notify_with_fds()
[all …]
/systemd-251/src/journal/
Djournald-syslog.c37 struct msghdr msghdr = { in forward_syslog_iovec() local
57 msghdr.msg_name = &sa.sa; in forward_syslog_iovec()
58 msghdr.msg_namelen = r; in forward_syslog_iovec()
62 msghdr.msg_control = &control; in forward_syslog_iovec()
63 msghdr.msg_controllen = sizeof(control); in forward_syslog_iovec()
65 cmsg = CMSG_FIRSTHDR(&msghdr); in forward_syslog_iovec()
70 msghdr.msg_controllen = cmsg->cmsg_len; in forward_syslog_iovec()
76 if (sendmsg(s->syslog_fd, &msghdr, MSG_NOSIGNAL) >= 0) in forward_syslog_iovec()
97 if (sendmsg(s->syslog_fd, &msghdr, MSG_NOSIGNAL) >= 0) in forward_syslog_iovec()
Djournald-stream.c558 struct msghdr msghdr = { in stdout_stream_process() local
589 l = recvmsg(s->fd, &msghdr, MSG_DONTWAIT|MSG_CMSG_CLOEXEC); in stdout_stream_process()
597 cmsg_close_all(&msghdr); in stdout_stream_process()
607 ucred = CMSG_FIND_DATA(&msghdr, SOL_SOCKET, SCM_CREDENTIALS, struct ucred); in stdout_stream_process()
952 struct msghdr msghdr = { in stdout_stream_send_notify() local
968 msghdr.msg_controllen = CMSG_SPACE(sizeof(int)); in stdout_stream_send_notify()
969 msghdr.msg_control = alloca0(msghdr.msg_controllen); in stdout_stream_send_notify()
971 cmsg = CMSG_FIRSTHDR(&msghdr); in stdout_stream_send_notify()
978 l = sendmsg(s->server->notify_fd, &msghdr, MSG_DONTWAIT|MSG_NOSIGNAL); in stdout_stream_send_notify()
Djournald-server.c1319 struct msghdr msghdr = { in server_process_datagram() local
1350 n = recvmsg_safe(fd, &msghdr, MSG_DONTWAIT|MSG_CMSG_CLOEXEC); in server_process_datagram()
1361 CMSG_FOREACH(cmsg, &msghdr) in server_process_datagram()
1405 … server_process_audit_message(s, s->buffer, n, ucred, &sa, msghdr.msg_namelen); in server_process_datagram()
Djournald-audit.c484 struct msghdr mh = { in enable_audit()
/systemd-251/src/basic/
Dlog.c486 const struct msghdr msghdr = { in write_to_syslog() local
498 n = sendmsg(syslog_fd, &msghdr, MSG_NOSIGNAL); in write_to_syslog()
630 const struct msghdr msghdr = { in write_to_journal() local
635 if (sendmsg(journal_fd, &msghdr, MSG_NOSIGNAL) < 0) in write_to_journal()
982 const struct msghdr msghdr = { in log_struct_internal() local
987 (void) sendmsg(journal_fd, &msghdr, MSG_NOSIGNAL); in log_struct_internal()
1069 const struct msghdr msghdr = { in log_struct_iovec_internal() local
1074 if (sendmsg(journal_fd, &msghdr, MSG_NOSIGNAL) >= 0) in log_struct_iovec_internal()
Dsocket-util.h178 struct cmsghdr* cmsg_find(struct msghdr *mh, int level, int type, socklen_t length);
305 ssize_t recvmsg_safe(int sockfd, struct msghdr *msg, int flags);
Dfd-util.h67 void cmsg_close_all(struct msghdr *mh);
Dsocket-util.c964 struct msghdr mh = { in send_one_fd_iov_sa()
1018 struct msghdr mh = { in receive_one_fd_iov()
1162 struct cmsghdr* cmsg_find(struct msghdr *mh, int level, int type, socklen_t length) { in cmsg_find()
1292 ssize_t recvmsg_safe(int sockfd, struct msghdr *msg, int flags) { in recvmsg_safe()
Dfd-util.c470 void cmsg_close_all(struct msghdr *mh) { in cmsg_close_all()
/systemd-251/src/libsystemd-network/
Dicmp6-util.c129 struct msghdr msg = { in icmp6_send_router_solicitation()
155 struct msghdr msg = { in icmp6_receive()
Dfuzz-dhcp-server-relay.c15 ssize_t sendmsg(int sockfd, const struct msghdr *msg, int flags) { in sendmsg()
Dfuzz-dhcp-server.c16 ssize_t sendmsg(int sockfd, const struct msghdr *msg, int flags) { in sendmsg()
/systemd-251/src/shared/
Dask-password-api.c878 struct msghdr msghdr = { in ask_password_agent() local
885 n = recvmsg_safe(socket_fd, &msghdr, 0); in ask_password_agent()
898 cmsg_close_all(&msghdr); in ask_password_agent()
905 ucred = CMSG_FIND_DATA(&msghdr, SOL_SOCKET, SCM_CREDENTIALS, struct ucred); in ask_password_agent()
/systemd-251/src/libsystemd/sd-resolve/
Dsd-resolve.c238 struct msghdr mh; in send_addrinfo_reply()
272 mh = (struct msghdr) { in send_addrinfo_reply()
294 struct msghdr mh; in send_nameinfo_reply()
319 mh = (struct msghdr) { in send_nameinfo_reply()
935 struct msghdr mh = {}; in resolve_getaddrinfo_with_destroy_callback()
1027 struct msghdr mh; in resolve_getnameinfo_with_destroy_callback()
1062 mh = (struct msghdr) { in resolve_getnameinfo_with_destroy_callback()
/systemd-251/src/import/
Dimportd.c556 struct msghdr msghdr = { in manager_on_notify() local
569 n = recvmsg_safe(fd, &msghdr, MSG_DONTWAIT|MSG_CMSG_CLOEXEC); in manager_on_notify()
576 cmsg_close_all(&msghdr); in manager_on_notify()
578 if (msghdr.msg_flags & MSG_TRUNC) { in manager_on_notify()
583 ucred = CMSG_FIND_DATA(&msghdr, SOL_SOCKET, SCM_CREDENTIALS, struct ucred); in manager_on_notify()
/systemd-251/src/libsystemd/sd-bus/
Dbus-socket.c139 struct msghdr mh = { in bus_socket_write_auth()
515 struct msghdr mh; in bus_socket_read_auth()
552 mh = (struct msghdr) { in bus_socket_read_auth()
1052 struct msghdr mh = { in bus_socket_write_message()
1186 struct msghdr mh; in bus_socket_read_message()
1218 mh = (struct msghdr) { in bus_socket_read_message()
/systemd-251/src/timesync/
Dtimesyncd-manager.c408 struct msghdr msghdr = { in manager_receive_response() local
431 len = recvmsg_safe(fd, &msghdr, MSG_DONTWAIT); in manager_receive_response()
440 if (iov.iov_len < sizeof(struct ntp_msg) || (msghdr.msg_flags & MSG_TRUNC)) { in manager_receive_response()
452 recv_time = CMSG_FIND_DATA(&msghdr, SOL_SOCKET, SCM_TIMESTAMPNS, struct timespec); in manager_receive_response()
/systemd-251/src/udev/
Dudevd.c1215 struct msghdr msghdr = { in on_worker() local
1225 size = recvmsg_safe(fd, &msghdr, MSG_DONTWAIT); in on_worker()
1234 cmsg_close_all(&msghdr); in on_worker()
1241 ucred = CMSG_FIND_DATA(&msghdr, SOL_SOCKET, SCM_CREDENTIALS, struct ucred); in on_worker()
Dudev-ctrl.c159 struct msghdr smsg = { in udev_ctrl_connection_event_handler()
/systemd-251/src/resolve/
Dresolved-manager.c755 struct msghdr mh = { in manager_recv()
888 static int sendmsg_loop(int fd, struct msghdr *mh, int flags) { in sendmsg_loop()
964 struct msghdr mh = { in manager_ipv4_send()
1019 struct msghdr mh = { in manager_ipv6_send()
Dresolved-dns-stream.c95 struct msghdr mh = {}; in dns_stream_identify()
218 struct msghdr hdr = { in dns_stream_writev()
/systemd-251/src/libsystemd/sd-device/
Ddevice-monitor.c430 struct msghdr smsg = { in device_monitor_receive_device()
559 struct msghdr smsg = { in device_monitor_send_device()
/systemd-251/src/libsystemd/sd-netlink/
Dnetlink-socket.c224 struct msghdr msg = { in socket_recv_message()
/systemd-251/src/coredump/
Dcoredump.c974 struct msghdr mh = { in process_socket()
1077 struct msghdr mh = { in send_iovec()

12