Changeset 41987 in vbox for trunk/src/VBox/Devices/Network/slirp/tftp.h
- Timestamp:
- Jul 2, 2012 4:44:45 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Network/slirp/tftp.h
r41970 r41987 18 18 /* tftp defines */ 19 19 20 #ifndef _SLIRP_TFTP_H_ 21 #define _SLIRP_TFTP_H_ 22 20 23 #define TFTP_SESSIONS_MAX 3 21 24 … … 31 34 #define TFTP_FILENAME_MAX 512 32 35 33 #if 0 34 struct tftp_t 35 { 36 struct ip ip; 37 struct udphdr udp; 38 u_int16_t tp_op; 39 union 40 { 41 struct 42 { 43 u_int16_t tp_block_nr; 44 u_int8_t tp_buf[512]; 45 } tp_data; 46 struct 47 { 48 u_int16_t tp_error_code; 49 u_int8_t tp_msg[512]; 50 } tp_error; 51 u_int8_t tp_buf[512 + 2]; 52 } x; 53 }; 54 #else 55 #pragma pack(0) 56 typedef struct TFTPCOREHDR 57 { 58 uint16_t u16TftpOpCode; 59 #if 0 60 union { 61 uint16_t u16BlockNum; 62 uint16_t u16TftpErrorCode; 63 } X; 36 37 int slirpTftpInput(PNATState pData, struct mbuf *m); 38 int slirpTftpInit(PNATState); 64 39 #endif 65 /* Data lays here (might be raw uint8_t* or header of payload ) */66 } TFTPCOREHDR, *PTFTPCOREHDR;67 68 typedef struct TFTPIPHDR69 {70 struct ip IPv4Hdr;71 struct udphdr UdpHdr;72 uint16_t u16TftpOpType;73 TFTPCOREHDR Core;74 /* Data lays here */75 } TFTPIPHDR, *PTFTPIPHDR;76 #pragma pack()77 78 typedef const PTFTPIPHDR PCTFTPIPHDR;79 #endif80 81 void tftp_input(PNATState pData, struct mbuf *m);
Note:
See TracChangeset
for help on using the changeset viewer.