i have the log file with byte dump and also structures.. using byte data as input i need to print the values of structures in user readable format..can anyone post the code..
here is txt file..

002c2a54:00000000 00001389 11950000 00000000 00000000 00002b74 0000011c 00000000
002c2a74:01010100 01000000 0e600384 00000000 00000384 00000000 00000000 00000000
002c2a94:00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
002c2ab4:00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
002c2ad4:00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
002c2af4:00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
002c2b14:00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
002c2b34:00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
002c2b54:00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
002c2b74:00000000 00000000 00000000 00000000 00000000 00000000



typedef union {
        unsigned long   all;            /* References the whole word. */
        struct {
                unsigned char   do_not_use;     /* Don't ever use this field */
                unsigned char   hdr_type ;   /* 1 = UX orig, 2 = IMS orig */
                unsigned short  ux_type ;   /* For UXWGETMSG() interface */
        } f;
        /*
         * This structure will be used for setting the destination
         * pcrid. This pcrid will be read by UXipmgr (satellite version), which
         * will set it again to have ux_type in it after reading the
         * the destination pcrid
         */
        struct {
                unsigned char do_not_use;
                unsigned char fill ;       /* unused */
                unsigned short   pcrid;      /* destination pcrid for the message */
        } dest;

} UXMTYPE;

typedef struct uxGLPID {
        long            portno;         /* The port number */
        unsigned short  pcrid;          /* The processor id */
        unsigned char   rsvd;           /* reserved field */
        unsigned char   uniq;           /* The uniq field */
} UXGLPID;

typedef union glMSGTYPE {
        unsigned long   all;            /* References the whole word. */
        struct {
#if defined (MI386) || defined (M8086) || defined (M80386)
                /*
                 * Definition of the type bitfields for the reversed
                 * bit/byte order of the 80386 processor. The message
                 * header is longword swabbed when it is received at
                 * the 6386 using UXswab.
                 */
                unsigned long   type : 28,      /* message type */
                                i_mtso : 1,     /* Inter MTSO */
                                format : 1,     /* packed or unpacked */
                                brdcst : 1,     /* broadcast message  */
                                datlnk : 1;     /* which data link */
#else
                unsigned long   datlnk : 1,     /* Which data link. */
                                brdcst : 1,     /* Broadcast message */
                                format : 1,     /* Packed or unpacked */

#ifndef APXRCS /* NON FLEXENT RCS build */
                                i_mtso : 1,     /* Inter-MTSO flag */

#else /* APXRCS is used for FLEXENT RCS build */
                                inter : 1,      /* Inter-MTSO flag */
#endif
#if (!defined(APXAPSPARC) && defined(APXRCS))
                                type : 12,
                                fill : 16;
#else
                                type : 28;
#endif /* NGNAP && RCS */
#endif  /* MI386 */
        } field_old ;
        struct {
            unsigned long type ;
        } field ;
} GLMSGTYPE;

Daniweb isn't a free code service. Please write the code yourself and ask specific questions if you need help doing so.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.