mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-11-29 14:50:59 +01:00
MINOR: obj: Add a new type of object, OBJ_TYPE_SRVRQ.
dns_srvrq will be objects used for dealing with SRV records.
This commit is contained in:
parent
a8c6db8d2d
commit
e2c222b12f
@ -131,6 +131,18 @@ static inline struct connection *objt_conn(enum obj_type *t)
|
||||
return __objt_conn(t);
|
||||
}
|
||||
|
||||
static inline struct dns_srvrq *__objt_dns_srvrq(enum obj_type *t)
|
||||
{
|
||||
return container_of(t, struct dns_srvrq, obj_type);
|
||||
}
|
||||
|
||||
static inline struct dns_srvrq *objt_dns_srvrq(enum obj_type *t)
|
||||
{
|
||||
if (!t || *t != OBJ_TYPE_SRVRQ)
|
||||
return NULL;
|
||||
return __objt_dns_srvrq(t);
|
||||
}
|
||||
|
||||
static inline void *obj_base_ptr(enum obj_type *t)
|
||||
{
|
||||
switch (obj_type(t)) {
|
||||
|
||||
@ -39,6 +39,7 @@ enum obj_type {
|
||||
OBJ_TYPE_APPLET, /* object is a struct applet */
|
||||
OBJ_TYPE_APPCTX, /* object is a struct appctx */
|
||||
OBJ_TYPE_CONN, /* object is a struct connection */
|
||||
OBJ_TYPE_SRVRQ, /* object is a struct dns_srvrq */
|
||||
OBJ_TYPE_ENTRIES /* last one : number of entries */
|
||||
} __attribute__((packed)) ;
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user