include/proto/proto_tcp.h
static inline struct stktable_key *addr_to_stktable_key(struct sockaddr_storage *addr)
{
	switch (addr->ss_family) {
	case AF_INET:
		static_table_key->key = (void *)&((struct sockaddr_in *)addr)->sin_addr;
		break;
	case AF_INET6:
		static_table_key->key = (void *)&((struct sockaddr_in6 *)addr)->sin6_addr;
		break;
	default:
		return NULL;
	}
	return static_table_key;
}
/* Converts the INET/INET6 source address to a stick_table key usable for table
 * lookups. Returns either NULL if the source cannot be converted (eg: not
 * IPv4) or a pointer to the converted result in static_table_key in the
 * appropriate format (IP).
 */
Converts the INET/INET6 source address to a stick_table key usable for table
lookups. Returns either NULL if the source cannot be converted  or a pointer to the converted result in static_table_key in the
appropriate format (IP).
Converts the INET / INET6 source address to a stick_table key usable for table lookups . Returns either NULL if the source cannot be converted or a pointer to the converted result in static_table_key in the appropriate format ( IP ) .
static inline struct stktable_key *addr_to_stktable_key(struct sockaddr_storage *addr)
{
	switch (addr->ss_family) {
	case AF_INET:
		static_table_key->key = (void *)&((struct sockaddr_in *)addr)->sin_addr;
		break;
	case AF_INET6:
		static_table_key->key = (void *)&((struct sockaddr_in6 *)addr)->sin6_addr;
		break;
	default:
		return NULL;
	}
	return static_table_key;
}
static inline struct stktable_key * addr_to_stktable_key ( struct sockaddr_storage * addr ) { switch ( addr -> ss_family ) { case AF_INET : static_table_key -> key = ( void * ) & ( ( struct sockaddr_in * ) addr ) -> sin_addr ; break ; case AF_INET6 : static_table_key -> key = ( void * ) & ( ( struct sockaddr_in6 * ) addr ) -> sin6_addr ; break ; default : return NULL ; } return static_table_key ; }
Converts the INET/INET6 source address to a stick_table key usable for table
 lookups.
Converts the INET / INET6 source address to a stick_table key usable for table lookups .