FreeBSD/contrib/bsnmp/snmpd/main.c
/*
 * Insert a port into the right place in the transport's table of ports
 */
Insert a port into the right place in the transport's table of ports
Insert a port into the right place in the transport ' s table of ports
void
trans_insert_port(struct transport *t, struct tport *port)
{
	struct tport *p;
	TAILQ_FOREACH(p, &t->table, link) {
		if (asn_compare_oid(&p->index, &port->index) > 0) {
			TAILQ_INSERT_BEFORE(p, port, link);
			return;
		}
	}
	port->transport = t;
	TAILQ_INSERT_TAIL(&t->table, port, link);
}
void trans_insert_port ( struct transport * t , struct tport * port ) { struct tport * p ; TAILQ_FOREACH ( p , & t -> table , link ) { if ( asn_compare_oid ( & p -> index , & port -> index ) > 0 ) { TAILQ_INSERT_BEFORE ( p , port , link ) ; return ; } } port -> transport = t ; TAILQ_INSERT_TAIL ( & t -> table , port , link ) ; }
Insert a port into the right place in the transport's table of ports
Insert a port into the right place in the transport ' s table of ports