Changeset 26037 in vbox for trunk/src/VBox/Devices/Network
- Timestamp:
- Jan 26, 2010 7:50:32 AM (15 years ago)
- Location:
- trunk/src/VBox/Devices/Network/slirp
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Network/slirp/bootp.c
r25822 r26037 189 189 rbp->bp_op = BOOTP_REPLY; 190 190 rbp->bp_xid = bp->bp_xid; /* see table 3 of rfc2131*/ 191 rbp->bp_flags = bp->bp_flags; 191 rbp->bp_flags = bp->bp_flags; /* figure 2 of rfc2131 */ 192 192 rbp->bp_giaddr.s_addr = bp->bp_giaddr.s_addr; 193 193 #if 0 /*check flags*/ … … 421 421 else 422 422 { 423 /* see table 4 rfc2131*/424 if (bp->bp_flags & DHCP_FLAGS_B)423 /* table 4 of rfc2131 */ 424 if (bp->bp_flags & RT_H2N_U16_C(DHCP_FLAGS_B)) 425 425 dhcp_stat = REBINDING; 426 426 else … … 729 729 m->m_data += sizeof(struct udphdr) 730 730 + sizeof(struct ip); 731 if ((flags & DHCP_FLAGS_B) || nack != 0) 731 if ( (flags & RT_H2N_U16_C(DHCP_FLAGS_B)) 732 || nack != 0) 732 733 daddr.sin_addr.s_addr = INADDR_BROADCAST; 733 734 else -
trunk/src/VBox/Devices/Network/slirp/bootp.h
r23496 r26037 95 95 #define DHCP_OPT_LEN 312 96 96 97 /* RFC 2131 */ 97 98 struct bootp_t 98 99 { 99 struct ip ip; 100 struct udphdr udp; 101 uint8_t bp_op; 102 uint8_t bp_htype; 103 uint8_t bp_hlen; 104 uint8_t bp_hops; 105 uint32_t bp_xid; 106 uint16_t bp_secs; 107 uint16_t bp_flags; 108 struct in_addr bp_ciaddr; 109 struct in_addr bp_yiaddr; 110 struct in_addr bp_siaddr; 111 struct in_addr bp_giaddr; 112 uint8_t bp_hwaddr[16]; 113 uint8_t bp_sname[64]; 114 uint8_t bp_file[128]; 115 uint8_t bp_vend[DHCP_OPT_LEN]; 100 struct ip ip; /**< header: IP header */ 101 struct udphdr udp; /**< header: UDP header */ 102 uint8_t bp_op; /**< opcode (BOOTP_REQUEST, BOOTP_REPLY) */ 103 uint8_t bp_htype; /**< hardware type */ 104 uint8_t bp_hlen; /**< hardware address length */ 105 uint8_t bp_hops; /**< hop count */ 106 uint32_t bp_xid; /**< transaction ID */ 107 uint16_t bp_secs; /**< numnber of seconds */ 108 uint16_t bp_flags; /**< flags (DHCP_FLAGS_B) */ 109 struct in_addr bp_ciaddr; /**< client IP address */ 110 struct in_addr bp_yiaddr; /**< your IP address */ 111 struct in_addr bp_siaddr; /**< server IP address */ 112 struct in_addr bp_giaddr; /**< gateway IP address */ 113 uint8_t bp_hwaddr[16]; /** client hardware address */ 114 uint8_t bp_sname[64]; /** server host name */ 115 uint8_t bp_file[128]; /** boot filename */ 116 uint8_t bp_vend[DHCP_OPT_LEN]; /**< vendor specific info */ 116 117 }; 117 118 118 119 119 #define DHCP_FLAGS_B (1<<15) 120 #define DHCP_FLAGS_B (1<<15) /**< B, broadcast */ 120 121 struct bootp_ext 121 122 {
Note:
See TracChangeset
for help on using the changeset viewer.