#ifndef PACKET_H
#define PACKET_H

#define PACKETSIZE (1024*4)  /*1150*/
#define PACKETDATASIZE (PACKETSIZE - sizeof(PacketHeader))
#define CHANNEL_BASE 3752

#define MAXPACKETS 16		/* size of PacketHeader.flags in bits */

typedef unsigned char Byte;

#define MAX_FRAME_SIZE (PACKETDATASIZE*(MAXPACKETS + 5))

typedef struct {
    unsigned int session;
    unsigned int frame;
    int          tstamp;  
    unsigned short size;
    unsigned short flags;
} PacketHeader;

typedef struct {
    PacketHeader header;
    Byte data[PACKETDATASIZE];
} PacketType;

typedef struct {
    PacketHeader header;
    Byte data[MAX_FRAME_SIZE];
} BigPacketType;

#endif	/* PACKET_H */
