Lines Matching refs:rcvd_pkt
162 dhcp_msg_t rcvd_pkt; member
664 memcpy(dest_sll.sll_addr, (broadcast)?bmacaddr:gstate.rcvd_pkt.chaddr , 6); in send_packet()
674 …packet.iph.daddr = (broadcast || (gstate.rcvd_pkt.ciaddr == 0))?INADDR_BROADCAST:gstate.rcvd_pkt.c… in send_packet()
700 memset(&gstate.rcvd_pkt, 0, sizeof(dhcp_msg_t)); in read_packet()
701 ret = read(gstate.listensock, &gstate.rcvd_pkt, sizeof(dhcp_msg_t)); in read_packet()
706 if (gstate.rcvd_pkt.cookie != htonl(DHCP_MAGIC)) { in read_packet()
710 if (gstate.rcvd_pkt.op != 1) { //BOOTPREQUEST in read_packet()
714 if (gstate.rcvd_pkt.hlen != 6) { in read_packet()
729 gstate.send_pkt.xid = gstate.rcvd_pkt.xid; in prepare_send_pkt()
732 memcpy(gstate.send_pkt.chaddr, gstate.rcvd_pkt.chaddr, 16); in prepare_send_pkt()
789 if ((overloaded == 1) | (overloaded == 3)) get_optval((uint8_t*)&gstate.rcvd_pkt.file, opt, var); in get_optval()
790 if ((overloaded == 2) | (overloaded == 3)) get_optval((uint8_t*)&gstate.rcvd_pkt.sname, opt, var); in get_optval()
799 for (optptr = gstate.rcvd_pkt.options; in get_reqparam()
1175 get_optval((uint8_t*)&gstate.rcvd_pkt.options, DHCP_OPT_MESSAGE_TYPE, &gstate.rqcode); in dhcpd_main()
1181 get_optval((uint8_t*) &gstate.rcvd_pkt.options, DHCP_OPT_SERVER_ID, &serverid); in dhcpd_main()
1190 get_optval((uint8_t*) &gstate.rcvd_pkt.options, DHCP_OPT_REQUESTED_IP, &requested_nip); in dhcpd_main()
1191 get_optval((uint8_t*) &gstate.rcvd_pkt.options, DHCP_OPT_HOST_NAME, &hstname); in dhcpd_main()
1195 …gstate.send_pkt.yiaddr = getip_from_pool(requested_nip, gstate.rcvd_pkt.chaddr, &reqested_lease, h… in dhcpd_main()
1202 get_optval((uint8_t*) &gstate.rcvd_pkt.options, DHCP_OPT_LEASE_TIME, &reqested_lease); in dhcpd_main()
1214 get_optval((uint8_t*) &gstate.rcvd_pkt.options, DHCP_OPT_REQUESTED_IP, &requested_nip); in dhcpd_main()
1215 get_optval((uint8_t*) &gstate.rcvd_pkt.options, DHCP_OPT_LEASE_TIME, &reqested_lease); in dhcpd_main()
1216 get_optval((uint8_t*) &gstate.rcvd_pkt.options, DHCP_OPT_HOST_NAME, &hstname); in dhcpd_main()
1217 …gstate.send_pkt.yiaddr = getip_from_pool(requested_nip, gstate.rcvd_pkt.chaddr, &reqested_lease, h… in dhcpd_main()
1235 get_optval((uint8_t*) &gstate.rcvd_pkt.options, DHCP_OPT_SERVER_ID, &serverid); in dhcpd_main()
1237 get_optval((uint8_t*) &gstate.rcvd_pkt.options, DHCP_OPT_REQUESTED_IP, &requested_nip); in dhcpd_main()
1238 …delip_from_lease(requested_nip, gstate.rcvd_pkt.chaddr, (gstate.rqcode==DHCPRELEASE)?0:gconfig.dec… in dhcpd_main()