/systemd/src/libsystemd-network/ |
H A D | dhcp6-network.c | 75 const void *packet, size_t len) { 86 r = sendto(s, packet, len, 0, &dest.sa, sizeof(dest.in6)); 74 dhcp6_network_send_udp_socket(int s, struct in6_addr *server_address, const void *packet, size_t len) argument
|
H A D | lldp-internal.h | 45 tlv_packet *packet; member in struct:lldp_neighbour_port
|
H A D | dhcp-network.c | 41 BPF_STMT(BPF_LD + BPF_W + BPF_LEN, 0), /* A <- packet length */ 42 BPF_JUMP(BPF_JMP + BPF_JGE + BPF_K, sizeof(DHCPPacket), 1, 0), /* packet >= DHCPPacket ? */ 203 const void *packet, size_t len) { 207 assert(packet); 210 r = sendto(s, packet, len, 0, &link->sa, sizeof(link->ll)); 218 const void *packet, size_t len) { 227 assert(packet); 230 r = sendto(s, packet, len, 0, &dest.sa, sizeof(dest.in)); 202 dhcp_network_send_raw_socket(int s, const union sockaddr_union *link, const void *packet, size_t len) argument 217 dhcp_network_send_udp_socket(int s, be32_t address, uint16_t port, const void *packet, size_t len) argument
|
H A D | dhcp-packet.c | 91 void dhcp_packet_append_ip_headers(DHCPPacket *packet, be32_t source_addr, argument 94 packet->ip.version = IPVERSION; 95 packet->ip.ihl = DHCP_IP_SIZE / 4; 96 packet->ip.tot_len = htobe16(len); 98 packet->ip.tos = IPTOS_CLASS_CS6; 100 packet->ip.protocol = IPPROTO_UDP; 101 packet->ip.saddr = source_addr; 102 packet->ip.daddr = destination_addr; 104 packet->udp.source = htobe16(source_port); 105 packet 117 dhcp_packet_verify_headers(DHCPPacket *packet, size_t len, bool checksum) argument [all...] |
H A D | test-dhcp-client.c | 148 int dhcp_network_send_raw_socket(int s, const union sockaddr_union *link, const void *packet, size_t len) { argument 154 assert_se(packet); 159 discover = memdup(packet, len); 216 int dhcp_network_send_udp_socket(int s, be32_t address, uint16_t port, const void *packet, size_t len) { argument
|
H A D | test-dhcp6-client.c | 87 uint8_t packet[] = { local 106 size_t buflen = sizeof(packet), outlen = sizeof(result); 117 buf = &packet[3]; 124 assert_se(buf == &packet[pos]); 127 assert_se(buflen + pos == sizeof(packet)); 137 assert_se(buf == &packet[pos]); 140 assert_se(buflen + pos == sizeof(packet)); 147 assert_se(memcmp(packet, result, sizeof(packet)) == 0); 656 const void *packet, size_ 655 dhcp6_network_send_udp_socket(int s, struct in6_addr *server_address, const void *packet, size_t len) argument [all...] |
H A D | sd-dhcp-server.c | 260 DHCPPacket *packet, size_t len) { 271 assert(packet); 274 memcpy(&link.ll.sll_addr, &packet->dhcp.chaddr, ETH_ALEN); 276 dhcp_packet_append_ip_headers(packet, server->address, DHCP_PORT_SERVER, 277 packet->dhcp.yiaddr, 280 return dhcp_network_send_raw_socket(server->fd_raw, &link, packet, len); 343 DHCPRequest *req, DHCPPacket *packet, 352 assert(packet); 354 r = dhcp_option_append(&packet->dhcp, req->max_optlen, &optoffset, 0, 360 r = dhcp_option_append(&packet 259 dhcp_server_send_unicast_raw(sd_dhcp_server *server, DHCPPacket *packet, size_t len) argument 342 dhcp_server_send_packet(sd_dhcp_server *server, DHCPRequest *req, DHCPPacket *packet, int type, size_t optoffset) argument 413 _cleanup_free_ DHCPPacket *packet = NULL; local 445 _cleanup_free_ DHCPPacket *packet = NULL; local 482 _cleanup_free_ DHCPPacket *packet = NULL; local 545 _cleanup_free_ DHCPPacket *packet = NULL; local 558 _cleanup_free_ DHCPPacket *packet = NULL; local [all...] |
H A D | sd-ipv4acd.c | 300 /* Send announcement packet */ 352 struct ether_arp packet; local 358 r = read(fd, &packet, sizeof(struct ether_arp)); 365 if (ipv4acd_arp_conflict(ll, &packet)) { 388 /* BPF ensures this packet indicates a conflict */
|
H A D | sd-dhcp-client.c | 411 _cleanup_free_ DHCPPacket *packet; local 428 packet = malloc0(size); 429 if (!packet) 432 r = dhcp_message_init(&packet->dhcp, BOOTREQUEST, client->xid, type, 447 packet->dhcp.secs = htobe16(secs); 461 packet->dhcp.flags = htobe16(0x8000); 470 memcpy(&packet->dhcp.chaddr, &client->mac_addr, ETH_ALEN); 492 r = dhcp_option_append(&packet->dhcp, optlen, &optoffset, 0, 508 r = dhcp_option_append(&packet->dhcp, optlen, &optoffset, 0, 531 value of this option higher, up to the size of the largest UDP packet 569 dhcp_client_send_raw(sd_dhcp_client *client, DHCPPacket *packet, size_t len) argument 1608 _cleanup_free_ DHCPPacket *packet = NULL; local [all...] |
/systemd/src/reply-password/ |
H A D | reply-password.c | 32 static int send_on_socket(int fd, const char *socket_name, const void *packet, size_t size) { argument 42 assert(packet); 46 if (sendto(fd, packet, size, MSG_NOSIGNAL, &sa.sa, offsetof(struct sockaddr_un, sun_path) + strlen(socket_name)) < 0) 54 char packet[LINE_MAX]; local 69 packet[0] = '+'; 70 if (!fgets(packet+1, sizeof(packet)-1, stdin)) { 75 truncate_nl(packet+1); 76 length = 1 + strlen(packet+1) + 1; 78 packet[ [all...] |
/systemd/src/resolve/ |
H A D | resolved-dns-server.c | 275 /* Remember the size of the largest UDP packet we received from a server, 318 /* Invoked whenever we get a packet with TC bit set. */ 436 /* RRSIG data was missing on a EDNS0 packet with DO bit set. This means the server doesn't 457 /* We got a failure packet, and are at a feature level above UDP. Note that in this case we 458 * downgrade no further than UDP, under the assumption that a failure packet indicates an 459 * incompatible packet contents, but not a problem with the transport. */ 468 /* We got too many TCP connection failures in a row, we had at least one truncated packet, and 470 * data we hope to make the packet smaller, so that it still works via UDP given that TCP 492 int dns_server_adjust_opt(DnsServer *server, DnsPacket *packet, DnsServerFeatureLevel level) { argument 498 assert(packet); [all...] |
H A D | resolved-dns-rr.c | 27 #include "resolved-dns-packet.h" 1178 DnsPacket packet = { local 1202 r = dns_packet_append_rr(&packet, rr, &start, &rds); 1207 assert(packet._data); 1210 rr->wire_format = packet._data; 1211 rr->wire_format_size = packet.size; 1215 packet._data = NULL; 1216 dns_packet_unref(&packet);
|
/systemd/src/tty-ask-password-agent/ |
H A D | tty-ask-password-agent.c | 70 _cleanup_free_ char *packet = NULL; local 102 packet = strdup("c"); 104 } else if (asprintf(&packet, "*\002%c%s%n", (int) (strlen(message) + 1), message, &n) < 0) 105 packet = NULL; 106 if (!packet) 109 r = loop_write(fd, packet, n + 1, true); 180 packet = mfree(packet); 182 if (asprintf(&packet, "*\002%c%s%n", (int) (strlen(message) + 1), message, &n) < 0) { 187 r = loop_write(fd, packet, 242 _cleanup_free_ char *packet = NULL; local [all...] |
/systemd/src/core/ |
H A D | automount.c | 911 union autofs_v5_packet_union packet; local 925 r = loop_read_exact(a->pipe_fd, &packet, sizeof(packet), true); 931 switch (packet.hdr.type) { 935 if (packet.v5_packet.pid > 0) { 938 get_process_comm(packet.v5_packet.pid, &p); 939 log_unit_info(UNIT(a), "Got automount request for %s, triggered by %"PRIu32" (%s)", a->where, packet.v5_packet.pid, strna(p)); 949 r = set_put(a->tokens, UINT_TO_PTR(packet.v5_packet.wait_queue_token)); 969 r = set_put(a->expire_tokens, UINT_TO_PTR(packet.v5_packet.wait_queue_token)); 1001 log_unit_error(UNIT(a), "Received unknown automount request %i", packet [all...] |
/systemd/src/libsystemd/sd-resolve/ |
H A D | sd-resolve.c | 325 static int handle_request(int out_fd, const Packet *packet, size_t length) { argument 329 assert(packet); 331 req = &packet->rheader; 339 const AddrInfoRequest *ai_req = &packet->addrinfo_request; 365 const NameInfoRequest *ni_req = &packet->nameinfo_request; 411 Packet packet; member in union:__anon164 429 if (handle_request(resolve->fds[RESPONSE_SEND_FD], &buf.packet, (size_t) length) < 0) 578 /* Send one termination packet for each worker */ 744 static int handle_response(sd_resolve *resolve, const Packet *packet, size_t length) { argument 751 resp = &packet 850 Packet packet; member in union:__anon165 [all...] |