VirtualBox

Ignore:
Timestamp:
Jul 2, 2012 4:44:45 PM (12 years ago)
Author:
vboxsync
Message:

NAT: hide TFTP internals.

File:
1 edited

Legend:

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

    r41970 r41987  
    1818/* tftp defines */
    1919
     20#ifndef _SLIRP_TFTP_H_
     21#define _SLIRP_TFTP_H_
     22
    2023#define TFTP_SESSIONS_MAX 3
    2124
     
    3134#define TFTP_FILENAME_MAX 512
    3235
    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
     37int slirpTftpInput(PNATState pData, struct mbuf *m);
     38int slirpTftpInit(PNATState);
    6439#endif
    65     /* Data lays here (might be raw uint8_t* or header of payload ) */
    66 } TFTPCOREHDR, *PTFTPCOREHDR;
    67 
    68 typedef 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 
    78 typedef const PTFTPIPHDR PCTFTPIPHDR;
    79 #endif
    80 
    81 void 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