/systemd/src/libsystemd/sd-resolve/ |
H A D | test-resolve.c | 81 struct sockaddr_in sa = { local 97 sa.sin_addr.s_addr = inet_addr(argc >= 3 ? argv[2] : "193.99.144.71"); 98 r = sd_resolve_getnameinfo(resolve, &q2, (struct sockaddr*) &sa, sizeof(sa), 0, SD_RESOLVE_GET_BOTH, getnameinfo_handler, NULL);
|
/systemd/src/reply-password/ |
H A D | reply-password.c | 34 struct sockaddr sa; member in union:__anon220 36 } sa = { local 44 strncpy(sa.un.sun_path, socket_name, sizeof(sa.un.sun_path)); 46 if (sendto(fd, packet, size, MSG_NOSIGNAL, &sa.sa, offsetof(struct sockaddr_un, sun_path) + strlen(socket_name)) < 0)
|
/systemd/src/basic/ |
H A D | sigbus.c | 128 struct sigaction sa = { local 136 assert_se(sigaction(SIGBUS, &sa, &old_sigaction) == 0);
|
H A D | signal-util.c | 32 static const struct sigaction sa = { local 46 if ((sigaction(sig, &sa, NULL) < 0)) 66 static int sigaction_many_ap(const struct sigaction *sa, int sig, va_list ap) { argument 75 if (sigaction(sig, sa, NULL) < 0) 84 if (sigaction(sig, sa, NULL) < 0) { 93 int sigaction_many(const struct sigaction *sa, ...) { argument 97 va_start(ap, sa); 98 r = sigaction_many_ap(sa, 0, ap); 106 static const struct sigaction sa = { local 115 r = sigaction_many_ap(&sa, si 123 static const struct sigaction sa = { local [all...] |
H A D | socket-util.h | 36 struct sockaddr sa; member in union:sockaddr_union 67 #define socket_address_family(a) ((a)->sockaddr.sa.sa_family) 109 int socknameinfo_pretty(union sockaddr_union *sa, socklen_t salen, char **_ret); 131 const struct sockaddr *sa, socklen_t len,
|
H A D | socket-util.c | 189 if (!socket_ipv6_is_supported() && b.sockaddr.sa.sa_family == AF_INET6) { 318 return sockaddr_pretty(&a->sockaddr.sa, a->size, false, true, ret); 455 if (getsockname(fd, &b.sockaddr.sa, &b.size) < 0) 458 if (b.sockaddr.sa.sa_family != a->sockaddr.sa.sa_family) 481 union sockaddr_union *sa = (union sockaddr_union*) _sa; local 483 assert(sa); 485 if (!IN_SET(sa->sa.sa_family, AF_INET, AF_INET6)) 488 return ntohs(sa 494 union sockaddr_union *sa = (union sockaddr_union*) _sa; local 603 union sockaddr_union sa; local 636 union sockaddr_union sa; local 653 socknameinfo_pretty(union sockaddr_union *sa, socklen_t salen, char **_ret) argument 680 union sockaddr_union sa; local 864 send_one_fd_sa( int transport_fd, int fd, const struct sockaddr *sa, socklen_t len, int flags) argument [all...] |
/systemd/src/resolve/ |
H A D | resolved-mdns.c | 136 union sockaddr_union sa = { local 195 r = bind(m->mdns_ipv4_fd, &sa.sa, sizeof(sa.in)); 213 union sockaddr_union sa = { local 272 r = bind(m->mdns_ipv6_fd, &sa.sa, sizeof(sa.in6));
|
H A D | resolved-llmnr.c | 124 union sockaddr_union sa = { local 184 r = bind(m->llmnr_ipv4_udp_fd, &sa.sa, sizeof(sa.in)); 204 union sockaddr_union sa = { local 263 r = bind(m->llmnr_ipv6_udp_fd, &sa.sa, sizeof(sa.in6)); 332 union sockaddr_union sa = { local 380 r = bind(m->llmnr_ipv4_tcp_fd, &sa 406 union sockaddr_union sa = { local [all...] |
H A D | resolved-dns-scope.c | 307 union sockaddr_union sa = {}; local 318 sa.sa.sa_family = server->family; 320 sa.in.sin_port = htobe16(port); 321 sa.in.sin_addr = server->address.in; 322 salen = sizeof(sa.in); 324 sa.in6.sin6_port = htobe16(port); 325 sa.in6.sin6_addr = server->address.in6; 326 sa.in6.sin6_scope_id = s->link ? s->link->ifindex : 0; 327 salen = sizeof(sa [all...] |
/systemd/src/test/ |
H A D | test-condition.c | 152 const char *sa; local 158 sa = architecture_to_string(a); 159 assert_se(sa); 161 condition = condition_new(CONDITION_ARCHITECTURE, sa, false, false); 169 condition = condition_new(CONDITION_ARCHITECTURE, sa, false, true);
|
H A D | test-socket-util.c | 56 assert_se(a.sockaddr.sa.sa_family == (socket_ipv6_is_supported() ? AF_INET6 : AF_INET)); 59 assert_se(a.sockaddr.sa.sa_family == AF_INET6); 62 assert_se(a.sockaddr.sa.sa_family == AF_INET6); 65 assert_se(a.sockaddr.sa.sa_family == AF_INET); 68 assert_se(a.sockaddr.sa.sa_family == AF_UNIX); 71 assert_se(a.sockaddr.sa.sa_family == AF_UNIX); 82 assert_se(a.sockaddr.sa.sa_family == AF_NETLINK); 267 union sockaddr_union *sa = arg; local 273 assert_se(connect(fd, &sa->sa, sizeo [all...] |
/systemd/src/fsck/ |
H A D | fsck.c | 254 static const union sockaddr_union sa = { local 265 if (connect(fd, &sa.sa, offsetof(struct sockaddr_un, sun_path) + strlen(sa.un.sun_path)) < 0) { 267 errno, "Failed to connect to progress socket %s, ignoring: %m", sa.un.sun_path);
|
/systemd/src/journal/ |
H A D | journal-send.c | 211 struct sockaddr_un sa = { local 216 .msg_name = &sa, 217 .msg_namelen = offsetof(struct sockaddr_un, sun_path) + strlen(sa.sun_path), 395 union sockaddr_union sa = { local 411 r = connect(fd, &sa.sa, offsetof(union sockaddr_union, un.sun_path) + strlen(sa.un.sun_path));
|
H A D | journald-native.c | 457 union sockaddr_union sa = { local 466 unlink(sa.un.sun_path); 468 r = bind(s->native_fd, &sa.sa, offsetof(union sockaddr_union, un.sun_path) + strlen(sa.un.sun_path)); 470 return log_error_errno(errno, "bind(%s) failed: %m", sa.un.sun_path); 472 (void) chmod(sa.un.sun_path, 0666);
|
H A D | journald-syslog.c | 47 static const union sockaddr_union sa = { local 54 .msg_name = (struct sockaddr*) &sa.sa, 392 static const union sockaddr_union sa = { local 401 unlink(sa.un.sun_path); 403 r = bind(s->syslog_fd, &sa.sa, offsetof(union sockaddr_union, un.sun_path) + strlen(sa.un.sun_path)); 405 return log_error_errno(errno, "bind(%s) failed: %m", sa.un.sun_path); 407 (void) chmod(sa [all...] |
H A D | journald-audit.c | 431 const union sockaddr_union *sa, 444 if (!sa || 446 sa->nl.nl_family != AF_NETLINK || 447 sa->nl.nl_pid != 0) { 489 union sockaddr_union sa = { local 500 .msg_name = &sa.sa, 501 .msg_namelen = sizeof(sa.nl), 523 static const union sockaddr_union sa = { local 539 if (bind(s->audit_fd, &sa 426 server_process_audit_message( Server *s, const void *buffer, size_t buffer_size, const struct ucred *ucred, const union sockaddr_union *sa, socklen_t salen) argument [all...] |
H A D | journald-stream.c | 708 union sockaddr_union sa = { local 717 unlink(sa.un.sun_path); 719 r = bind(s->stdout_fd, &sa.sa, offsetof(union sockaddr_union, un.sun_path) + strlen(sa.un.sun_path)); 721 return log_error_errno(errno, "bind(%s) failed: %m", sa.un.sun_path); 723 (void) chmod(sa.un.sun_path, 0666); 726 return log_error_errno(errno, "listen(%s) failed: %m", sa.un.sun_path);
|
/systemd/src/libsystemd/sd-netlink/ |
H A D | netlink-internal.h | 60 struct sockaddr sa; member in union:sd_netlink::__anon156
|
H A D | netlink-socket.c | 115 r = bind(nl->fd, &nl->sockaddr.sa, addrlen); 120 r = getsockname(nl->fd, &nl->sockaddr.sa, &addrlen); 239 struct sockaddr sa; member in union:__anon157 251 0, &addr.sa, sizeof(addr));
|
/systemd/src/login/ |
H A D | pam_systemd.c | 127 union sockaddr_union sa = { local 147 strncpy(sa.un.sun_path, p, sizeof(sa.un.sun_path)-1); 153 if (connect(fd, &sa.sa, offsetof(struct sockaddr_un, sun_path) + strlen(sa.un.sun_path)) < 0)
|
/systemd/src/core/ |
H A D | dbus.c | 970 union sockaddr_union sa = { local 992 strcpy(sa.un.sun_path, "/run/systemd/private"); 995 size_t left = sizeof(sa.un.sun_path); 996 char *p = sa.un.sun_path; 1008 salen = sizeof(sa.un) - left; 1011 (void) mkdir_parents_label(sa.un.sun_path, 0755); 1012 (void) unlink(sa.un.sun_path); 1018 r = bind(fd, &sa.sa, salen);
|
/systemd/src/shared/ |
H A D | ask-password-api.c | 417 union sockaddr_union sa = { local 431 snprintf(sa.un.sun_path, sizeof(sa.un.sun_path)-1, "/run/systemd/ask-password/sck.%" PRIx64, random_u64()); 434 if (bind(fd, &sa.sa, offsetof(struct sockaddr_un, sun_path) + strlen(sa.un.sun_path)) < 0) 441 c = strdup(sa.un.sun_path);
|
/systemd/src/socket-proxy/ |
H A D | socket-proxyd.c | 329 static int connection_start(Connection *c, struct sockaddr *sa, socklen_t salen) { argument 333 assert(sa); 336 c->client_fd = socket(sa->sa_family, SOCK_STREAM|SOCK_NONBLOCK|SOCK_CLOEXEC, 0); 342 r = connect(c->client_fd, sa, salen); 401 union sockaddr_union sa = {}; local 407 sa.un.sun_family = AF_UNIX; 408 strncpy(sa.un.sun_path, arg_remote_host, sizeof(sa.un.sun_path)-1); 409 sa.un.sun_path[sizeof(sa [all...] |
/systemd/src/tty-ask-password-agent/ |
H A D | tty-ask-password-agent.c | 69 union sockaddr_union sa = PLYMOUTH_SOCKET; local 97 r = connect(fd, &sa.sa, offsetof(struct sockaddr_un, sun_path) + 1 + strlen(sa.un.sun_path+1)); 244 union sockaddr_union sa = { .un.sun_family = AF_UNIX }; local 270 strncpy(sa.un.sun_path, socket_name, sizeof(sa.un.sun_path)); 272 r = sendto(socket_fd, packet, packet_length, MSG_NOSIGNAL, &sa.sa,
|
/systemd/src/libsystemd-network/ |
H A D | sd-ndisc.c | 482 union sockaddr_union sa = {}; local 484 .msg_name = &sa.sa, 485 .msg_namelen = sizeof(sa), 527 else if (msg.msg_namelen != sizeof(sa.in6)) { 531 gw = &sa.in6.sin6_addr;
|