libpktlab - The PacketLab Utility Library
Public Attributes | List of all members
pktlab_message Struct Reference

Structure for storing the decoded form of pktlab messages. More...

#include <pktlab.h>

Public Attributes

enum pktlab_message_type type
 
union {
   struct {
      const void *   ptr
 
      uint32_t   len
 
      bool   malformed
 
   }   raw
 
   struct {
      const void *   hintptr
 
      const void *   dataptr
 
      uint8_t   hintlen
 
      uint32_t   datalen
 
   }   cdata
 
   struct {
   }   start
 
   struct {
   }   end
 
   struct {
      pktlab_time_t   rhint
 
   }   yield
 
   struct {
   }   cont
 
   struct {
      uint16_t   errid
 
      union {
         struct {
            uint16_t   indx
 
            uint16_t   errid
 
         }   monrej
 
         struct {
            uint16_t   indx
 
         }   monukn
 
      } 
 
   }   result
 
   struct {
      uint32_t   addr
 
      uint32_t   len
 
      const void *   ptr
 
   }   mdata
 
   struct {
      uint32_t   addr
 
      uint32_t   len
 
   }   mread
 
   struct {
      uint32_t   addr
 
      uint32_t   len
 
      const void *   ptr
 
   }   mwrite
 
   struct {
      uint8_t   sktid
 
      uint8_t   family
 
      uint8_t   proto
 
      uint32_t   rbufsz
 
      uint8_t   laddrlen
 
      uint8_t   lportlen
 
      uint8_t   raddrlen
 
      uint8_t   rportlen
 
      const void *   laddrptr
 
      const void *   lportptr
 
      const void *   raddrptr
 
      const void *   rportptr
 
   }   nopen
 
   struct {
      uint8_t   sktid
 
   }   nclose
 
   struct {
      uint8_t   sktid
 
      uint8_t   family
 
      uint8_t   proto
 
      pktlab_time_t   time
 
      uint16_t   tag
 
      union {
         struct {
            uint8_t   raddrlen
 
            const void *   raddrptr
 
            uint8_t   rportlen
 
            const void *   rportptr
 
         }   udp
 
      } 
 
      uint32_t   len
 
      const void *   ptr
 
   }   nsend
 
   struct {
      uint8_t   sktid
 
      uint8_t   family
 
      uint8_t   proto
 
      pktlab_time_t   endtime
 
      const void *   filter
 
      uint32_t   filterlen
 
   }   ncap
 
   struct {
      uint8_t   sktid
 
      uint8_t   family
 
      uint8_t   proto
 
      pktlab_time_t   time
 
      union {
         struct {
            uint8_t   command
 
         }   tcp
 
      } 
 
   }   nctl
 
   struct {
      uint8_t   sktid
 
      uint16_t   tag
 
      pktlab_time_t   time
 
      uint16_t   errid
 
   }   ntag
 
   struct {
      uint8_t   sktid
 
      uint8_t   family
 
      uint8_t   proto
 
      pktlab_time_t   time
 
      uint8_t   code
 
      union {
         struct {
            uint8_t   raddrlen
 
            const void *   raddrptr
 
            uint8_t   rportlen
 
            const void *   rportptr
 
         }   tcp_established
 
      } 
 
   }   nstat
 
   struct {
      uint8_t   sktid
 
      uint8_t   family
 
      uint8_t   proto
 
      pktlab_time_t   time
 
      union {
         struct {
            uint8_t   raddrlen
 
            const void *   raddrptr
 
            uint8_t   rportlen
 
            const void *   rportptr
 
         }   udp
 
      } 
 
      const void *   ptr
 
      uint32_t   len
 
   }   ndata
 
   struct {
      uint8_t   sktid
 
      uint8_t   family
 
      uint8_t   proto
 
      pktlab_time_t   tfirst
 
      pktlab_time_t   tlast
 
      uint32_t   unitcnt
 
      uint32_t   bytecnt
 
   }   ndrop
 
   struct {
      uint8_t   sktid
 
      uint8_t   family
 
      uint8_t   proto
 
      uint16_t   monindx
 
      uint16_t   monerrid
 
      pktlab_time_t   time
 
   }   nblock
 
   struct {
      const void *   derptr
 
      uint32_t   derlen
 
   }   xcert
 
   struct {
      const void *   chlistptr
 
      uint32_t   chlistlen
 
      const void *   eopkey
 
      const void *   xdescrptr
 
      uint32_t   xdescrlen
 
   }   xpub
 
   struct {
      const void *   chlistptr
 
      uint32_t   chlistlen
 
      const void *   eopkey
 
      const void *   dattrptr
 
      uint32_t   dattrlen
 
   }   xsub
 
   struct {
   }   suspd
 
   struct {
   }   resumd
 
   struct {
      const void *   channelptr
 
      uint8_t   channellen
 
      const void *   xdescrptr
 
      uint32_t   xdescrlen
 
   }   xnotify
 
   struct {
      const void *   snikeyptr
 
      uint32_t   snikeylen
 
   }   xreg
 
}; 
 

Detailed Description

Structure for storing the decoded form of pktlab messages.

The pktlab_message struct should be set by:

  1. Setting the msg type in the "type" field.
  2. Setting the struct within the union based on the msg type. E.g. For PKTLAB_NOPEN_MESSAGE, one should set "type" to PKTLAB_NOPEN_MESSAGE, and fill out the "nopen" struct with the correct values. See the pktlab protocol documentation on struct value requirements for a msg type.

The documentation for this struct was generated from the following file: