mirror of
http://git.haproxy.org/git/haproxy.git
synced 2026-02-13 21:19:13 +02:00
MINOR: protocols: replace protocol_by_family() with protocol_lookup()
At a few places we were still using protocol_by_family() instead of the richer protocol_lookup(). The former is limited as it enforces SOCK_STREAM and a stream protocol at the control layer. At least with protocol_lookup() we don't have this limitationn. The values were still set for now but later we can imagine making them configurable on the fly.
This commit is contained in:
@@ -76,16 +76,6 @@ int protocol_resume_all(void);
|
||||
*/
|
||||
int protocol_enable_all(void);
|
||||
|
||||
/* returns the protocol associated to family <family> with sock_type and
|
||||
* ctrl_type of SOCK_STREAM, or NULL if not found
|
||||
*/
|
||||
static inline struct protocol *protocol_by_family(int family)
|
||||
{
|
||||
if (family >= 0 && family < AF_CUST_MAX)
|
||||
return __protocol_by_family[family][0][0];
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/* returns the protocol associated to family <family> with proto_type among the
|
||||
* supported protocol types, and ctrl_type of either SOCK_STREAM or SOCK_DGRAM
|
||||
* depending on the requested values, or NULL if not found.
|
||||
|
||||
Reference in New Issue
Block a user