#ifndef _TRACE_DEF_H
#define _TRACE_DEF_H

#include <linux/in.h>
#include <linux/in6.h>


#ifndef u8
typedef unsigned char u8;
#endif 

#ifndef u16
typedef unsigned short u16;
#endif

#ifndef u32
typedef unsigned int u32;
#endif


typedef enum {
    TRACE_SUCCESS = 0,
    TRACE_FAILURE,
    TRACE_PENDING
} trace_ret_t;


typedef enum {
    TRACE_FAMILY_IP4 = 0x0,
    TRACE_FAMILY_IP6
} trace_family_t;

typedef struct _addr {
    trace_family_t family;
    union {
        struct in_addr ip4;
        struct in6_addr ip6;
    } addr;
} addr_t;

typedef struct _trace_policy {
    addr_t      src;
    u16    sport;
    addr_t      dst;
    u16    dport;
    u8     protocol;

    //PKT_TUPLE
    u16    app_type;
} trace_policy_t;

#endif