PERFORCE change 82826 for review

Victor Cruceru soc-victor at FreeBSD.org
Tue Aug 30 07:56:47 GMT 2005


http://perforce.freebsd.org/chv.cgi?CH=82826

Change 82826 by soc-victor at soc-victor_82.76.158.176 on 2005/08/30 07:55:46

	Removed the old UDP code (for the obsoleted UDP-MIB/ RFC 2013).

Affected files ...

.. //depot/projects/soc2005/bsnmp/contrib/bsnmp/snmp_mibII/mibII.c#6 edit
.. //depot/projects/soc2005/bsnmp/contrib/bsnmp/snmp_mibII/mibII_tree.def#5 edit
.. //depot/projects/soc2005/bsnmp/contrib/bsnmp/snmp_mibII/mibII_udp.c#2 delete
.. //depot/projects/soc2005/bsnmp/usr.sbin/bsnmpd/modules/snmp_tcp_udp46/tcp_udp46.h#5 edit

Differences ...

==== //depot/projects/soc2005/bsnmp/contrib/bsnmp/snmp_mibII/mibII.c#6 (text+ko) ====

@@ -58,9 +58,6 @@
 static u_int ifmib_reg;
 static u_int ipmib_reg;
 
-#if 0
-static u_int udpmib_reg;
-#endif /*0*/
 
 static u_int ipForward_reg;
 
@@ -115,9 +112,6 @@
 
 static const struct asn_oid oid_ifMIB = OIDX_ifMIB;
 static const struct asn_oid oid_ipMIB = OIDX_ipMIB;
-#if 0
-static const struct asn_oid oid_udpMIB = OIDX_udpMIB;
-#endif /*0*/
 static const struct asn_oid oid_ipForward = OIDX_ipForward;
 static const struct asn_oid oid_linkDown = OIDX_linkDown;
 static const struct asn_oid oid_linkUp = OIDX_linkUp;
@@ -1446,10 +1440,6 @@
 	   "The MIB module for managing IP and ICMP implementations, but "
 	   "excluding their management of IP routes.", module);
 
-#if 0
-	udpmib_reg = or_register(&oid_udpMIB,
-	   "The MIB module for managing UDP implementations.", module);
-#endif 	/*0*/   
 
 	ipForward_reg = or_register(&oid_ipForward,
 	   "The MIB module for the display of CIDR multipath IP Routes.",
@@ -1507,9 +1497,6 @@
 	/* XXX free memory */
 
 	or_unregister(ipForward_reg);
-#if 0	
-	or_unregister(udpmib_reg);
-#endif
 	or_unregister(ipmib_reg);
 	or_unregister(ifmib_reg);
 

==== //depot/projects/soc2005/bsnmp/contrib/bsnmp/snmp_mibII/mibII_tree.def#5 (text+ko) ====

@@ -148,17 +148,6 @@
         (25 icmpOutAddrMasks COUNTER op_icmpstat GET)
         (26 icmpOutAddrMaskReps COUNTER op_icmpstat GET)
       )
-#      (7 udp
-#        (1 udpInDatagrams COUNTER op_udp GET)
-#        (2 udpNoPorts COUNTER op_udp GET)
-#        (3 udpInErrors COUNTER op_udp GET)
-#        (4 udpOutDatagrams COUNTER op_udp GET)
-#        (5 udpTable
-#          (1 udpEntry : IPADDRESS INTEGER op_udptable
-#            (1 udpLocalAddress IPADDRESS GET)
-#            (2 udpLocalPort INTEGER GET)
-#        ))
-#      )
       (31 ifMIB
         (1 ifMIBObjects
           (1 ifXTable
@@ -201,8 +190,6 @@
       )
       (48 ipMIB
       )
-#      (50 udpMIB
-#      )
   ))
   (6 snmpV2
     (3 snmpModules

==== //depot/projects/soc2005/bsnmp/usr.sbin/bsnmpd/modules/snmp_tcp_udp46/tcp_udp46.h#5 (text+ko) ====

@@ -50,7 +50,7 @@
 /*a debug macro*/
 #ifndef NDEBUG
 #define	L4_DPRINTF(ARGS) do {			\
-	fprintf(stderr, "TCP46_DEBUG: ");	\
+	fprintf(stderr, "L4_DEBUG: ");		\
 	fprintf ARGS;				\
    } while (0)
 #else
@@ -73,9 +73,9 @@
  * for both active and passive entries
  */
 struct tcp_index {
-	struct asn_oid	index;
-	struct xtcpcb	*tp;
-	pid_t		so_pgid;
+	struct asn_oid	index;		/* SNMP index; ecoded from tcp_index::tp*/
+	struct xtcpcb	*tp;		/* pointer to the TCP control block */
+	pid_t		so_pgid;	/* the PID of owner for this TCP endpoint*/
 };
 
 /*
@@ -83,18 +83,18 @@
  * endpoint
  */
 struct udp_index {
-	struct asn_oid	index;
-	struct xinpcb	*inp;
-	pid_t		so_pgid;
+	struct asn_oid	index;		/* SNMP index; ecoded from tcp_index::inp*/
+	struct xinpcb	*inp;		/* pointer to the IN(udp) control block */
+	pid_t		so_pgid;	/* the PID of owner for this UDP endpoint*/
 };
 
 
 struct tcp_udp46_state {
 	struct clockinfo clock_info;
-	uint64_t	tcp_tick;		/*agent tick when this struct was 
+	uint64_t	tcp_tick;		/*agent tick when TCP data was 
 							last updated*/
-	struct tcpstat	tcpstat;		/*holder for tcp stats*/
-	struct xinpgen	*tcp_xinpgen;		/*holder for data get via sysctl; 
+	struct tcpstat	tcpstat;		/*holder for UDP stats (v4 & v6)*/
+	struct xinpgen	*tcp_xinpgen;		/*holder for TCP data obtained via sysctl; 
 							malloc'd*/
 	size_t		tcp_xinpgen_len;	/*the allocated len of the above vector */
 	u_int		tcp_estab_count;	/*value for the scalar named tcpCurrEstab*/
@@ -115,21 +115,23 @@
 							tcp table; malloc'd*/
 	size_t		listen_tcpoids_len;	/*the allocated len of the above vector */
 	
-	uint64_t	udp_tick;
-	struct udpstat	udpstat;
-	struct xinpgen	*udp_xinpgen;
-	size_t		udp_xinpgen_len;
-	u_int		udp4_total;
-	u_int		all_udp_total;
+	uint64_t	udp_tick;		/*agent tick when UDP data was updated*/	
+	struct udpstat	udpstat;		/*holder to UDP stats (v4 & v6)*/
+	struct xinpgen	*udp_xinpgen;		/*holder for UDP data obtained via sysctl; 
+							malloc'd*/
+	size_t		udp_xinpgen_len;	/*the allocated len of the above vector */
+	u_int		udp4_total;		/*the number of UDP v4 entries*/
+	u_int		all_udp_total;		/*the number of UDP v4 & v6 entries*/
 
-	struct udp_index *udp4oids;
-	size_t		udp4oids_len;
+	struct udp_index *udp4oids;		/*snmp vector for the udp4 table; malloc'd*/
+	size_t		udp4oids_len;		/*the allocated len of the above vector */
 
-	struct udp_index *all_udpoids;
-	size_t		  all_udpoids_len;
+	struct udp_index *all_udpoids;		/*snmp vector for the unified v4 and v6 
+							udp table; malloc'd*/
+	size_t		  all_udpoids_len;      /*the allocated len of the above vector */
 	
 	
-	struct xfile 	*xfiles;
+	struct xfile 	*xfiles;		/*holder for xfiles; malloc'd*/
 	size_t 		xfiles_len;
 	u_int		xfiles_total;
 
@@ -138,7 +140,7 @@
 
 /*
  * Global variable used to hold all the data
- * related to this SNMP module
+ * internal to this SNMP module
  */
 extern
 struct tcp_udp46_state tcp_udp46_state_g;


More information about the p4-projects mailing list