FreeBSD/usr.sbin/bsnmpd/modules/snmp_netgraph/snmp_netgraph.c
/*
 * Connect our node to some other node
 */
Connect our node to some other node
Connect our node to some other node
int
ng_connect_node(const char *node, const char *ourhook, const char *peerhook)
{
	struct ngm_connect conn;
	snprintf(conn.path, NG_PATHSIZ, "%s:", node);
	strlcpy(conn.ourhook, ourhook, NG_HOOKSIZ);
	strlcpy(conn.peerhook, peerhook, NG_HOOKSIZ);
	return (NgSendMsg(csock, ".:",
	    NGM_GENERIC_COOKIE, NGM_CONNECT, &conn, sizeof(conn)));
}
int ng_connect_node ( const char * node , const char * ourhook , const char * peerhook ) { struct ngm_connect conn ; snprintf ( conn . path , NG_PATHSIZ , " " , node ) ; strlcpy ( conn . ourhook , ourhook , NG_HOOKSIZ ) ; strlcpy ( conn . peerhook , peerhook , NG_HOOKSIZ ) ; return ( NgSendMsg ( csock , " " , NGM_GENERIC_COOKIE , NGM_CONNECT , & conn , sizeof ( conn ) ) ) ; }
Connect our node to some other node
Connect our node to some other node