L7VS-MIB DEFINITIONS ::= BEGIN
IMPORTS
	OBJECT-TYPE, NOTIFICATION-TYPE, MODULE-IDENTITY,
	INTEGER, enterprises
	FROM SNMPv2-SMI

	TEXTUAL-CONVENTION, DisplayString
	FROM SNMPv2-TC

	nttcomware 
	FROM CW-MIB;


l7vs MODULE-IDENTITY
	LAST-UPDATED "200602280000Z"
	ORGANIZATION "L7VS MIB"
	CONTACT-INFO
	"Email: ultramonkey-l7-users@lists.sourceforge.jp"
	DESCRIPTION
	"L7VS-SNMP MIB"
	::= { nttcomware 1 }


l7vsClusterInfo	OBJECT IDENTIFIER ::= { l7vs 1 }

l7vsVersion	OBJECT-TYPE
	SYNTAX	DisplayString
	MAX-ACCESS	read-only
	STATUS	current
	DESCRIPTION
	"This value denotes the current version of L7VS Kernel module"
	::= { l7vsClusterInfo 1 }

l7vsNumServices	OBJECT-TYPE
	SYNTAX	INTEGER
	MAX-ACCESS	read-only
	STATUS	current
	DESCRIPTION
	"This value indicates the total number of L7VS Virtual services currently registered"
	::= { l7vsClusterInfo 2 }


-- Virtual Service Table


l7vsServiceTable	OBJECT-TYPE
	SYNTAX	SEQUENCE OF l7vsServiceEntry
	MAX-ACCESS	not-accessible
	STATUS	current
	DESCRIPTION
	"This defines the table that contains L7VS Virtual Service Specific Information.
	This is used in combination with l7vsServiceEntry and L7vsServiceEntry"
	::= { l7vs 17 }

l7vsServiceEntry	OBJECT-TYPE
	SYNTAX      L7vsServiceEntry
	MAX-ACCESS	not-accessible
	STATUS      current
	DESCRIPTION
	"This denotes an entry containing information about L7VS Virtual Service"
	INDEX	{ l7vsServiceNumber }
	::= { l7vsServiceTable 1 }

L7vsServiceEntry ::= SEQUENCE {
	l7vsServiceNumber		INTEGER,	-- Index into the table
	l7vsServiceSchedType		DisplayString,	-- Scheduler
	l7vsServiceProto     		INTEGER,	-- Transport protocol
	l7vsServiceAddr	     		DisplayString,	-- IP address
	l7vsServicePort      		INTEGER, 	-- Port number
	l7vsServiceNumDests		INTEGER,	-- Number of real servers
	l7vsServicePersist		INTEGER,	-- Persistency
	l7vsServiceBackLog		INTEGER,	-- Backlog length
	l7vsProtocolModuleName		DisplayString,	-- Protocol module name
	l7vsProtocolModuleKey	DisplayString,	-- Protocol module Key value
	l7vsProtocolModuleString	DisplayString,	-- Protocol module Entire string argument
	l7vsServiceReschedule	INTEGER	-- Reschedule
}

l7vsServiceNumber	OBJECT-TYPE
	SYNTAX	INTEGER (0..65535)
	MAX-ACCESS	read-only
	STATUS	current
	DESCRIPTION
	"This value denotes the L7VS Virtual Service number.
	This would be used as an Index into the table"
	::= { l7vsServiceEntry 1 }

l7vsServiceSchedType	OBJECT-TYPE
	SYNTAX DisplayString	
	MAX-ACCESS  read-only
	STATUS	current
	DESCRIPTION
	"This value denotes the Virtual Service Scheduler Algorithm.
	This could be rr, wc etc"
	::= { l7vsServiceEntry 2 }

l7vsServiceProto	OBJECT-TYPE
	SYNTAX	INTEGER {
		tcp(6), -- TCP protocol
		udp(17) -- UDP protocol
	}
	MAX-ACCESS	read-only
	STATUS	current
	DESCRIPTION
	"This denotes the Protocol (TCP/UDP) used"
	::= { l7vsServiceEntry 3 }

l7vsServiceAddr	OBJECT-TYPE
	SYNTAX	DisplayString
	MAX-ACCESS	read-only
	STATUS	current
	DESCRIPTION
	"This value denotes the IP Address of the Virtual Service, that is, VIP"
	::= { l7vsServiceEntry 4 }

l7vsServicePort	OBJECT-TYPE
	SYNTAX	INTEGER (0..65535)
	MAX-ACCESS	read-only
	STATUS	current
	DESCRIPTION
	"This value denotes the Port number of the service Virtual Service"
	::= { l7vsServiceEntry 5 }

l7vsServiceNumDests	OBJECT-TYPE
	SYNTAX	INTEGER (0..65535)
	MAX-ACCESS	read-only
	STATUS	current
	DESCRIPTION
	"This value indicates the total number real-servers for the Virtual Service"
	::= { l7vsServiceEntry 6 }

l7vsServicePersist	OBJECT-TYPE
	SYNTAX	INTEGER (0..10)
	MAX-ACCESS	read-only
	STATUS	current
	DESCRIPTION
	"This value indicates the timeout value of the persistent sessions, if the Virtual Service is persistent"
	::= { l7vsServiceEntry 7 }

l7vsServiceBackLog	OBJECT-TYPE
	SYNTAX	INTEGER (0..10)
	MAX-ACCESS	read-only
	STATUS	current
	DESCRIPTION
	"This value denotes the listen(2) backlog length of the Virtual Service"
	::= { l7vsServiceEntry 8 }

l7vsProtocolModuleName	OBJECT-TYPE
	SYNTAX	DisplayString
	MAX-ACCESS	read-only
	STATUS	current
	DESCRIPTION
	"This value indicates the Protocol Module Name for the Virtual service.
	This could be url, pfilter etc"
	::= { l7vsServiceEntry 9 }

l7vsProtocolModuleKey	OBJECT-TYPE
	SYNTAX	DisplayString
	MAX-ACCESS	read-only
	STATUS	current
	DESCRIPTION
	"This value denotes the concatenated string value of Protocol Module Key
	for the Virtual service.
	If there are many Keys for the Virtual Service, all of those arguments would be
	concatenated as a single string and output"
	::= { l7vsServiceEntry 10 }

l7vsProtocolModuleString	OBJECT-TYPE
	SYNTAX	DisplayString
	MAX-ACCESS	read-only
	STATUS	current
	DESCRIPTION
	"This value denotes the concatenated string value of Protocol Module Arguments
	for the Virtual service.
	If there are many arguments for the Virtual Service, all of those arguments would be
	concatenated as a single string and output"
	::= { l7vsServiceEntry 11 }

l7vsServiceReschedule	OBJECT-TYPE
	SYNTAX	INTEGER (0..1)
	MAX-ACCESS	read-only
	STATUS	current
	DESCRIPTION
	"This value denotes the Rescheduler Option for the Virtual service.
	A value of 1 indicates that the Reschedule option has been set
	and a value of 0 indicates otherwise"
	::= { l7vsServiceEntry 12 }


-- Real Server Table


l7vsRealTable	OBJECT-TYPE
	SYNTAX	SEQUENCE OF l7vsRealEntry
	MAX-ACCESS	not-accessible
	STATUS	current
	DESCRIPTION
	"This defines the table that contains L7VS Real Server Specific Information.
	This is used in combination with l7vsRealEntry and L7vsRealEntry"
	::= { l7vs 18 }

l7vsRealEntry	OBJECT-TYPE
	SYNTAX	L7vsRealEntry
	MAX-ACCESS	not-accessible
	STATUS	current
	DESCRIPTION
	"This denotes an entry containing information about L7VS Real Server"
	INDEX   { 	l7vsRealServiceNumber,
		l7vsRealServerNumber
	}
	::= { l7vsRealTable 1 }

L7vsRealEntry ::= SEQUENCE {
l7vsRealServiceNumber	INTEGER,	-- Virtual Service number serving as index to the table
l7vsRealServerNumber	INTEGER,	-- Real Server number, serving as index to the table
l7vsRealServerAddr		DisplayString,	-- IP address
l7vsRealServerPort		INTEGER,	-- Port
l7vsRealServerFlag		INTEGER,	-- Forward flag
l7vsRealServerWeight		INTEGER,	-- Weight
l7vsRealServerActiveConn	INTEGER,	-- Number of active connections
l7vsRealServerInactiveConn	INTEGER	-- Number of inactive connections
}

l7vsRealServiceNumber	OBJECT-TYPE
	SYNTAX	INTEGER (0..65535)
	MAX-ACCESS	read-only
	STATUS	current
	DESCRIPTION
	"This value denotes the L7VS Virtual Service number.
	This would be used as an Index into the table"
	::= { l7vsRealEntry 1 }

l7vsRealServerNumber OBJECT-TYPE
	SYNTAX	INTEGER (0..65535)
	MAX-ACCESS  read-only
	STATUS	current
	DESCRIPTION
	"This value denotes the L7VS Real Server number.
		This would be used as an Index into the table"
	::= { l7vsRealEntry 2 }

l7vsRealServerAddr	OBJECT-TYPE
	SYNTAX		DisplayString	
	MAX-ACCESS	read-only
	STATUS	current
	DESCRIPTION
	"This value denotes the IP Address of the Real Server"
	::= { l7vsRealEntry 3 }

l7vsRealServerPort	OBJECT-TYPE
	SYNTAX	INTEGER (0..65535)	
	MAX-ACCESS	read-only
	STATUS	current
	DESCRIPTION
	"This value denotes the Port of the Real Server"
	::= { l7vsRealEntry 4 }

l7vsRealServerFlag	OBJECT-TYPE
	SYNTAX	INTEGER {
		masq(0),	-- Masquerading mechansim
		local(1),	-- Local
		tunnel(2),	-- IPIP Encapsulation (Tunneling)
		route(3)	-- Gatewaying (Direct routing)
	}
	MAX-ACCESS	read-only
	STATUS	current
	DESCRIPTION
	"This value denotes the Packet Forwarding mechanism of the Real Server"
	::= { l7vsRealEntry 5 }

l7vsRealServerWeight	OBJECT-TYPE
	SYNTAX	INTEGER (0..65535)
	MAX-ACCESS	read-only
	STATUS	current
	DESCRIPTION
	"This value denotes the weight of the Real Server.
	Weight indicates the capacity of the server relative to others in the pool"
	::= { l7vsRealEntry 6 }

l7vsRealServerActiveConn	OBJECT-TYPE
	SYNTAX	INTEGER (0..65535)
	MAX-ACCESS	read-only
	STATUS	current
	DESCRIPTION
	"This value denotes the number of Active connections for the Real Server"
	::= { l7vsRealEntry 7 }

l7vsRealServerInactiveConn	OBJECT-TYPE
	SYNTAX	INTEGER (0..65535)
	MAX-ACCESS	read-only
	STATUS	current
	DESCRIPTION
	"This value denotes the number of Inactive connections for the Real Server"
	::= { l7vsRealEntry 8 }


-- Trap Table for L7VS


l7vsTrapTable	OBJECT IDENTIFIER ::= { l7vs 900 }

l7vsChangeType		OBJECT-TYPE
	SYNTAX		DisplayString	
	MAX-ACCESS	read-only
	STATUS	current
	DESCRIPTION
	"This value denotes the type of Change. This could be Add Virtual Service,
	Add Real Server etc"
	::= { l7vsTrapTable 1 }

l7vsChangeString	OBJECT-TYPE
	SYNTAX		DisplayString	
	MAX-ACCESS	read-only
	STATUS	current
	DESCRIPTION
	"This value denotes the Data that has changed"
	::= { l7vsTrapTable 2 }

l7vsVirtualServiceUpdate	NOTIFICATION-TYPE
	OBJECTS	{ l7vsChangeType l7vsChangeString }
	STATUS	current
	DESCRIPTION
	"This trap is triggered when there is change in the Virtual Services.
	This could be Addition, removal or edit of Virtual Services"
	::= { l7vsTrapTable 3 }

l7vsRealServerUpdate	NOTIFICATION-TYPE
	OBJECTS	{ l7vsChangeType l7vsChangeString }
	STATUS	current
	DESCRIPTION
	"This trap is triggered when there is change in the Real Servers.
	This could be Addition, removal or edit of Real Servers"
	::= { l7vsTrapTable 4 }

l7vsTableClear	NOTIFICATION-TYPE
	OBJECTS	{ l7vsChangeType }
	STATUS	current
	DESCRIPTION
	"This trap is triggered when there is l7vsadm -C command.
	Thus clearing off the L7VS Kernel table"
	::= { l7vsTrapTable 5 }

END
