/*
 * simco_client_ext.h
 *
 * Copyright (C) 2005, Ranch Networks, Inc.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
 *
 * Author : Srivatsa Chivukula <srivatsa@ranchnetworks.com>
 *
 */

#ifndef SIMCO_CLIENT_EXT_H
#define SIMCO_CLIENT_EXT_H

#include "simco_client.h"

#ifdef  __cplusplus
extern "C" {
#endif

  typedef struct _simcoExtPacket {
    int ruleId;
    unsigned char action;
    unsigned char syslog;
    unsigned char srcZoneId;
    unsigned char dstZoneId;
    unsigned char protocol;
    unsigned char tos;
    unsigned char ipfrag_selfdst;
    unsigned int ip_options;
    unsigned int tcp_flags_options;
    unsigned int icmp_type;
    unsigned int packet_rate;
    unsigned short reject_code;
    unsigned int internal_ip_mask;
    unsigned short internal_port;
    unsigned short internal_port_range;
    char internal_ip[16];
    unsigned int external_ip_mask;
    unsigned short external_port;
    unsigned short external_port_range;
    char external_ip[16];
    char copy_forward_ip[16];
    unsigned int ext_capabilities;
    unsigned int lifetime;
    int status;
  } simcoExtPacket_t;

  extern int simco_frc_b(int i, simcoExtPacket_t *sep);
  extern int simco_frd_b(int i, simcoExtPacket_t *sep);
  extern int simco_frs_b(int i, simcoExtPacket_t *sep);
  extern int simco_frl_b(int i, int **rules, int *numrules);

  extern int simco_frc_nb(int i, simcoExtPacket_t *sep);
  extern int simco_frd_nb(int i, simcoExtPacket_t *sep);
  extern int simco_frs_nb(int i, simcoExtPacket_t *sep);
  extern int simco_frl_nb(int i);

  extern void reg_frc_callback(int (*fn)(int con, simcoExtPacket_t *sep));
  extern void reg_frd_callback(int (*fn)(int con, simcoExtPacket_t *sep));
  extern void reg_frs_callback(int (*fn)(int con, simcoExtPacket_t *sep));
  extern void reg_frl_callback(int (*fn)(int con, int *rlist, int size));

#ifdef  __cplusplus
}
#endif


#endif /* !SIMCO_CLIENT_EXT_H */


