/*							-- DO NOT EDIT --
 * This file has been generated by smidump
 * version 0.3.1 for the scli package.
 *
 * Derived from TCP-MIB:
 *   The MIB module for managing TCP implementations.
 *
 * Revision 1994-11-01 00:00:
 *   [Revision added by libsmi due to a LAST-UPDATED clause.]
 *
 * Revision 1991-03-31 00:00:
 *   The initial revision of this MIB module was part of MIB-
 *   II.
 *
 * $Id: tcp-mib.h,v 1.14 2002/03/26 16:26:27 schoenw Exp $
 */

#ifndef _TCP_MIB_H_
#define _TCP_MIB_H_

#include "g_snmp.h"

/*
 * Tables to map enumerations to strings and vice versa.
 */

#define TCP_MIB_TCPRTOALGORITHM_OTHER    1
#define TCP_MIB_TCPRTOALGORITHM_CONSTANT 2
#define TCP_MIB_TCPRTOALGORITHM_RSRE     3
#define TCP_MIB_TCPRTOALGORITHM_VANJ     4

extern GSnmpEnum const tcp_mib_enums_tcpRtoAlgorithm[];

#define TCP_MIB_TCPCONNSTATE_CLOSED      1
#define TCP_MIB_TCPCONNSTATE_LISTEN      2
#define TCP_MIB_TCPCONNSTATE_SYNSENT     3
#define TCP_MIB_TCPCONNSTATE_SYNRECEIVED 4
#define TCP_MIB_TCPCONNSTATE_ESTABLISHED 5
#define TCP_MIB_TCPCONNSTATE_FINWAIT1    6
#define TCP_MIB_TCPCONNSTATE_FINWAIT2    7
#define TCP_MIB_TCPCONNSTATE_CLOSEWAIT   8
#define TCP_MIB_TCPCONNSTATE_LASTACK     9
#define TCP_MIB_TCPCONNSTATE_CLOSING     10
#define TCP_MIB_TCPCONNSTATE_TIMEWAIT    11
#define TCP_MIB_TCPCONNSTATE_DELETETCB   12

extern GSnmpEnum const tcp_mib_enums_tcpConnState[];


/*
 * C type definitions for TCP-MIB::tcp.
 */

#define TCP_MIB_TCPRTOALGORITHM (1 << 0) 
#define TCP_MIB_TCPRTOMIN       (1 << 1) 
#define TCP_MIB_TCPRTOMAX       (1 << 2) 
#define TCP_MIB_TCPMAXCONN      (1 << 3) 
#define TCP_MIB_TCPACTIVEOPENS  (1 << 4) 
#define TCP_MIB_TCPPASSIVEOPENS (1 << 5) 
#define TCP_MIB_TCPATTEMPTFAILS (1 << 6) 
#define TCP_MIB_TCPESTABRESETS  (1 << 7) 
#define TCP_MIB_TCPCURRESTAB    (1 << 8) 
#define TCP_MIB_TCPINSEGS       (1 << 9) 
#define TCP_MIB_TCPOUTSEGS      (1 << 10) 
#define TCP_MIB_TCPRETRANSSEGS  (1 << 11) 
#define TCP_MIB_TCPINERRS       (1 << 12) 
#define TCP_MIB_TCPOUTRSTS      (1 << 13) 

typedef struct {
    gint32   *tcpRtoAlgorithm;
    gint32   *tcpRtoMin;
    gint32   *tcpRtoMax;
    gint32   *tcpMaxConn;
    guint32  *tcpActiveOpens;
    guint32  *tcpPassiveOpens;
    guint32  *tcpAttemptFails;
    guint32  *tcpEstabResets;
    guint32  *tcpCurrEstab;
    guint32  *tcpInSegs;
    guint32  *tcpOutSegs;
    guint32  *tcpRetransSegs;
    guint32  *tcpInErrs;
    guint32  *tcpOutRsts;
} tcp_mib_tcp_t;

extern tcp_mib_tcp_t *
tcp_mib_new_tcp(void);

extern void
tcp_mib_get_tcp(GSnmpSession *s, tcp_mib_tcp_t **tcp, gint mask);

extern void
tcp_mib_free_tcp(tcp_mib_tcp_t *tcp);

/*
 * C type definitions for TCP-MIB::tcpConnEntry.
 */

#define TCP_MIB_TCPCONNSTATE        (1 << 0) 
#define TCP_MIB_TCPCONNLOCALADDRESS (1 << 1) 
#define TCP_MIB_TCPCONNLOCALPORT    (1 << 2) 
#define TCP_MIB_TCPCONNREMADDRESS   (1 << 3) 
#define TCP_MIB_TCPCONNREMPORT      (1 << 4) 

typedef struct {
    guchar   tcpConnLocalAddress[4];
#define TCP_MIB_TCPCONNLOCALADDRESSLENGTH 4
    gint32   tcpConnLocalPort;
    guchar   tcpConnRemAddress[4];
#define TCP_MIB_TCPCONNREMADDRESSLENGTH 4
    gint32   tcpConnRemPort;
    gint32   *tcpConnState;
} tcp_mib_tcpConnEntry_t;

extern void
tcp_mib_get_tcpConnTable(GSnmpSession *s, tcp_mib_tcpConnEntry_t ***tcpConnEntry, gint mask);

extern void
tcp_mib_free_tcpConnTable(tcp_mib_tcpConnEntry_t **tcpConnEntry);

extern tcp_mib_tcpConnEntry_t *
tcp_mib_new_tcpConnEntry(void);

extern void
tcp_mib_get_tcpConnEntry(GSnmpSession *s, tcp_mib_tcpConnEntry_t **tcpConnEntry, guchar *tcpConnLocalAddress, gint32 tcpConnLocalPort, guchar *tcpConnRemAddress, gint32 tcpConnRemPort, gint mask);

extern void
tcp_mib_set_tcpConnEntry(GSnmpSession *s, tcp_mib_tcpConnEntry_t *tcpConnEntry, gint mask);

extern void
tcp_mib_free_tcpConnEntry(tcp_mib_tcpConnEntry_t *tcpConnEntry);


#endif /* _TCP_MIB_H_ */
