/busybox-1.35.0/networking/udhcp/ |
D | packet.c | 16 void FAST_FUNC udhcp_init_header(struct dhcp_packet *packet, char type) in udhcp_init_header() argument 18 memset(packet, 0, sizeof(*packet)); in udhcp_init_header() 19 packet->op = BOOTREQUEST; /* if client to a server */ in udhcp_init_header() 24 packet->op = BOOTREPLY; /* if server to client */ in udhcp_init_header() 26 packet->htype = 1; /* ethernet */ in udhcp_init_header() 27 packet->hlen = 6; in udhcp_init_header() 28 packet->cookie = htonl(DHCP_MAGIC); in udhcp_init_header() 30 packet->options[0] = DHCP_END; in udhcp_init_header() 31 udhcp_add_simple_option(packet, DHCP_MESSAGE_TYPE, type); in udhcp_init_header() 36 void FAST_FUNC udhcp_dump_packet(struct dhcp_packet *packet) in udhcp_dump_packet() argument [all …]
|
D | d6_packet.c | 16 void FAST_FUNC d6_dump_packet(struct d6_packet *packet) in d6_dump_packet() argument 23 , packet->d6_xid32 in d6_dump_packet() 32 , struct d6_packet *packet, int fd) in d6_recv_kernel_packet() argument 36 memset(packet, 0, sizeof(*packet)); in d6_recv_kernel_packet() 37 bytes = safe_read(fd, packet, sizeof(*packet)); in d6_recv_kernel_packet() 49 d6_dump_packet(packet); in d6_recv_kernel_packet() 61 struct ip6_udp_d6_packet packet; in d6_send_raw_packet_from_client_data_ifindex() local 73 memset(&packet, 0, offsetof(struct ip6_udp_d6_packet, data)); in d6_send_raw_packet_from_client_data_ifindex() 74 packet.data = *d6_pkt; /* struct copy */ in d6_send_raw_packet_from_client_data_ifindex() 89 packet.ip6.ip6_vfc = (6 << 4); /* 4 bits version, top 4 bits of tclass */ in d6_send_raw_packet_from_client_data_ifindex() [all …]
|
D | dhcpc.c | 478 static void fill_envp(struct dhcp_packet *packet) in fill_envp() argument 486 if (!packet) in fill_envp() 489 init_scan_state(packet, &scan_state); in fill_envp() 495 while ((optptr = udhcp_scan_options(packet, &scan_state)) != NULL) { in fill_envp() 542 sprint_nip(new_opt, "ip=", (uint8_t *) &packet->yiaddr); in fill_envp() 545 if (packet->siaddr_nip) { in fill_envp() 548 sprint_nip(new_opt, "siaddr=", (uint8_t *) &packet->siaddr_nip); in fill_envp() 551 if (packet->gateway_nip) { in fill_envp() 554 sprint_nip(new_opt, "giaddr=", (uint8_t *) &packet->gateway_nip); in fill_envp() 557 if (!(scan_state.overload & FILE_FIELD) && packet->file[0]) { in fill_envp() [all …]
|
D | dhcpd.c | 641 static void init_packet(struct dhcp_packet *packet, struct dhcp_packet *oldpacket, char type) in init_packet() argument 645 udhcp_init_header(packet, type); in init_packet() 647 packet->xid = oldpacket->xid; in init_packet() 648 memcpy(packet->chaddr, oldpacket->chaddr, sizeof(oldpacket->chaddr)); in init_packet() 649 packet->flags = oldpacket->flags; in init_packet() 650 packet->gateway_nip = oldpacket->gateway_nip; in init_packet() 651 packet->ciaddr = oldpacket->ciaddr; in init_packet() 652 udhcp_add_simple_option(packet, DHCP_SERVER_ID, server_data.server_nip); in init_packet() 658 static void add_server_options(struct dhcp_packet *packet) in add_server_options() argument 664 if (packet->yiaddr) { /* if we aren't from send_inform()... */ in add_server_options() [all …]
|
D | d6_dhcpc.c | 482 static uint8_t *init_d6_packet(struct d6_packet *packet, char type) in init_d6_packet() argument 487 memset(packet, 0, sizeof(*packet)); in init_d6_packet() 489 packet->d6_xid32 = client_data.xid; in init_d6_packet() 490 packet->d6_msg_type = type; /* union, overwrites lowest byte of d6_xid32 */ in init_d6_packet() 495 ptr = packet->d6_options; /* NB: it is 32-bit aligned */ in init_d6_packet() 546 static int d6_mcast_from_client_data_ifindex(struct d6_packet *packet, uint8_t *end) in d6_mcast_from_client_data_ifindex() argument 559 packet, (end - (uint8_t*) packet), in d6_mcast_from_client_data_ifindex() 590 struct d6_packet packet; in send_d6_info_request() local 594 opt_ptr = init_d6_packet(&packet, D6_MSG_INFORMATION_REQUEST); in send_d6_info_request() 602 return d6_mcast_from_client_data_ifindex(&packet, opt_ptr); in send_d6_info_request() [all …]
|
D | Kbuild.src | 12 lib-$(CONFIG_UDHCPC) += common.o packet.o signalpipe.o socket.o 13 lib-$(CONFIG_UDHCPD) += common.o packet.o signalpipe.o socket.o 18 lib-$(CONFIG_DHCPRELAY) += dhcprelay.o common.o socket.o packet.o
|
D | common.h | 232 void init_scan_state(struct dhcp_packet *packet, struct dhcp_scan_state *scan_state) FAST_FUNC; 233 uint8_t *udhcp_scan_options(struct dhcp_packet *packet, struct dhcp_scan_state *scan_state) FAST_FU… 234 uint8_t *udhcp_get_option(struct dhcp_packet *packet, int code) FAST_FUNC; 238 uint8_t *udhcp_get_option32(struct dhcp_packet *packet, int code) FAST_FUNC; 240 void udhcp_add_binary_option(struct dhcp_packet *packet, uint8_t *addopt) FAST_FUNC; 242 void udhcp_add_simple_option(struct dhcp_packet *packet, uint8_t code, uint32_t data) FAST_FUNC; 302 void udhcp_dump_packet(struct dhcp_packet *packet) FAST_FUNC; 354 void udhcp_init_header(struct dhcp_packet *packet, char type) FAST_FUNC; 357 int udhcp_recv_kernel_packet(struct dhcp_packet *packet, int fd) FAST_FUNC;
|
D | common.c | 234 void FAST_FUNC init_scan_state(struct dhcp_packet *packet, struct dhcp_scan_state *scan_state) in init_scan_state() argument 237 scan_state->rem = sizeof(packet->options); in init_scan_state() 238 scan_state->optionptr = packet->options; in init_scan_state() 244 uint8_t* FAST_FUNC udhcp_scan_options(struct dhcp_packet *packet, struct dhcp_scan_state *scan_stat… in udhcp_scan_options() argument 270 scan_state->optionptr = packet->file; in udhcp_scan_options() 271 scan_state->rem = sizeof(packet->file); in udhcp_scan_options() 277 scan_state->optionptr = packet->sname; in udhcp_scan_options() 278 scan_state->rem = sizeof(packet->sname); in udhcp_scan_options() 317 uint8_t* FAST_FUNC udhcp_get_option(struct dhcp_packet *packet, int code) in udhcp_get_option() argument 322 init_scan_state(packet, &scan_state); in udhcp_get_option() [all …]
|
D | d6_common.h | 159 struct d6_packet *packet, int fd 175 void FAST_FUNC d6_dump_packet(struct d6_packet *packet); 177 # define d6_dump_packet(packet) ((void)0) argument
|
D | Config.src | 153 seems to confuse maximum allowed UDP packet size with 154 maximum size of entire IP packet, and sends packets
|
/busybox-1.35.0/networking/ |
D | ping.c | 241 char packet[DEFDATALEN + MAXIPLEN + MAXICMPLEN]; member 258 pkt = (struct icmp *) G.packet; in ping4() 262 pkt->icmp_cksum = inet_cksum(pkt, sizeof(G.packet)); in ping4() 264 xsendto(pingsock, G.packet, DEFDATALEN + ICMP_MINLEN, &lsa->u.sa, lsa->len); in ping4() 272 c = recvfrom(pingsock, G.packet, sizeof(G.packet), 0, in ping4() 275 c = recv(pingsock, G.packet, sizeof(G.packet), 0); in ping4() 283 struct iphdr *iphdr = (struct iphdr *) G.packet; in ping4() 285 pkt = (struct icmp *) (G.packet + (iphdr->ihl << 2)); /* skip ip hdr */ in ping4() 301 pkt = (struct icmp6_hdr *) G.packet; in ping6() 309 xsendto(pingsock, G.packet, DEFDATALEN + sizeof(struct icmp6_hdr), &lsa->u.sa, lsa->len); in ping6() [all …]
|
D | arping.c | 86 unsigned char packet[4096]; member 427 cc = recvfrom(sock_fd, G.packet, sizeof(G.packet), 0, (struct sockaddr *) &from, &alen); in arping_main() 435 recv_pack(G.packet, cc, &from); in arping_main()
|
D | telnetd.ctrlSQ.patch | 7 properly. It does not put the pty into packet mode and then notify the 30 TIOCPKT Enable/disable packet mode. When applied to the master side of a pseudo terminal, e… 125 + * If we are in packet mode, and we have
|
/busybox-1.35.0/docs/ |
D | tcp.txt | 22 (send RST packet). 72 /* At this point, kernel sent FIN packet, not RST, to the peer, */ 85 and this forces last, partially filled packet (if any) to be sent:
|