/**
 @Name:		dumphdr.h
*/

#define dumphdr_ID	105

struct dumphdr_instance {	// dumphdr instance
  struct rp_instance rootinstance;	// base class part
  // @User:  Add any instance variables below
  int		pkt_count;	// number of pkts handled
  // some IP pseudo-hdr fields
  u_int32_t	hlen;		// 4-bit header length
  u_int32_t	tos;		// TOS byte
  u_int32_t	len;		// total length
  u_int32_t	id;		// 16-bit identification
  u_int32_t	ttl;		// TTL
  u_int32_t	proto;		// protocol
  u_int32_t	saddr;		// src IP addr
  u_int32_t	daddr;		// dst IP addr
  u_int32_t	sport;		// UDP/TCP src port
  u_int32_t	dport;		// UDP/TCP dst port
};

// @User: Add any externs for class-wide global variables here.  None
//	needed if you have only one .c file (i.e., dumphdr.c).

// *** You should not have to change anything below this line

void dumphdr_init_class();		// function prototypes
struct rp_class *dumphdr_get_class();
struct rp_instance *dumphdr_create_instance(struct rp_class *, u_int32_t);
void dumphdr_handle_packet(struct rp_instance *, void *);
void dumphdr_free_instance(struct rp_instance *);
void dumphdr_bind_instance(struct rp_instance *);
void dumphdr_unbind_instance(struct rp_instance *);
int  dumphdr_handle_msg(struct rp_instance *, void *, u_int8_t,
						u_int8_t, u_int8_t *);
int dumphdr  (struct lkm_table *, int, int, struct kernel_plugin_fct_struct *);
int dumphdr_load(struct lkm_table *, int);
int dumphdr_unload(struct lkm_table *, int);

