Struct C to C#

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • ttan

    #1

    Struct C to C#

    Can any one help with translate the struct below to from c#

    Any help are aprreciated.

    typedef struct _FastMacAddrTyp e {
    ULONG hifour;
    USHORT lotwo;
    }FastMacAddrTyp e, *PFastMacAddrTy pe;

    typedef struct _ETHERNET_HEADE R_NOPREAMBLE {
    FastMacAddrType dest_addr;
    FastMacAddrType source_addr;
    unsigned short type;
    } ETHERNET_HEADER _NOPREAMBLE,*PE THERNET_HEADER_ NOPREAMBLE;

    typedef struct _GRE_HEADER {
    USHORT CksmFlagVersion ;
    USHORT ProtocolType;
    } GRE_HEADER, *PGRE_HEADER;

    typedef struct _CF9_UPDATE {
    ETHERNET_HEADER _NOPREAMBLE ether_header;
    GRE_HEADER GreHeader;
    UCHAR CF9_Type;
    UCHAR FillBytes[13];
    UCHAR Sequence;
    UCHAR DataType;
    UCHAR Data[1]; } CF9_UPDATE, *PCF9_UPDATE;

    typedef struct _CF9_STATUS {
    ETHERNET_HEADER _NOPREAMBLE ether_header;
    GRE_HEADER GreHeader;
    UCHAR CF9_Type;
    UCHAR FillBytes[13];
    UCHAR MicroRevision[8];
    UCHAR FpgaRevision[8];
    UCHAR SwitchName[22];
    PORT_REGISTERS PortRegisters;
    } CF9_STATUS, *PCF9_STATUS;
Working...