package/libs/libnl-tiny/src/cache_mngt.c
/**
 * Associate a message type to a set of cache operations
 * @arg protocol		netlink protocol
 * @arg msgtype			netlink message type
 *
 * Associates the specified netlink message type with
 * a registered set of cache operations.
 *
 * @return The cache operations or NULL if no association
 *         could be made.
 */
Associate a message type to a set of cache operations
@arg protocol                netlink protocol
@arg msgtype                 netlink message type

Associates the specified netlink message type with
a registered set of cache operations.

@return The cache operations or NULL if no association
could be made.
Associate a message type to a set of cache operations @arg protocol netlink protocol @arg msgtype netlink message type Associates the specified netlink message type with a registered set of cache operations . @return The cache operations or NULL if no association could be made .
struct nl_cache_ops *nl_cache_ops_associate(int protocol, int msgtype)
{
	int i;
	struct nl_cache_ops *ops;
	for (ops = cache_ops; ops; ops = ops->co_next) {
		if (ops->co_protocol != protocol)
			continue;
		for (i = 0; ops->co_msgtypes[i].mt_id >= 0; i++)
			if (ops->co_msgtypes[i].mt_id == msgtype)
				return ops;
	}
	return NULL;
}
struct nl_cache_ops * nl_cache_ops_associate ( int protocol , int msgtype ) { int i ; struct nl_cache_ops * ops ; for ( ops = cache_ops ; ops ; ops = ops -> co_next ) { if ( ops -> co_protocol != protocol ) continue ; for ( i = 0 ; ops -> co_msgtypes [ i ] . mt_id >= 0 ; i ++ ) if ( ops -> co_msgtypes [ i ] . mt_id == msgtype ) return ops ; } return NULL ; }
Associate a message type to a set of cache operations
 @arg protocol                netlink protocol
 @arg msgtype                 netlink message type
Associate a message type to a set of cache operations @arg protocol netlink protocol @arg msgtype netlink message type