VirtualBox

Ignore:
Timestamp:
Jun 29, 2012 5:55:17 AM (12 years ago)
Author:
vboxsync
Message:

NAT:tftp enhancements style, option parsing, handshaking.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Network/slirp/tftp.h

    r28800 r41970  
    3131#define TFTP_FILENAME_MAX 512
    3232
     33#if 0
    3334struct tftp_t
    3435{
     
    5152    } x;
    5253};
     54#else
     55#pragma pack(0)
     56typedef struct TFTPCOREHDR
     57{
     58    uint16_t    u16TftpOpCode;
     59#if 0
     60    union {
     61        uint16_t u16BlockNum;
     62        uint16_t u16TftpErrorCode;
     63    } X;
     64#endif
     65    /* Data lays here (might be raw uint8_t* or header of payload ) */
     66} TFTPCOREHDR, *PTFTPCOREHDR;
     67
     68typedef struct TFTPIPHDR
     69{
     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
     78typedef const PTFTPIPHDR PCTFTPIPHDR;
     79#endif
    5380
    5481void tftp_input(PNATState pData, struct mbuf *m);
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette