diff --git a/include/re_bfcp.h b/include/re_bfcp.h index 549eb8c..d30ea30 100644 --- a/include/re_bfcp.h +++ b/include/re_bfcp.h @@ -260,6 +260,7 @@ const char *bfcp_prim_name(enum bfcp_prim prim); /* conn */ int bfcp_listen(struct bfcp_conn **bcp, enum bfcp_transp tp, struct sa *laddr, bfcp_recv_h *recvh, void *arg); +void *bfcp_sock(const struct bfcp_conn *bc); /* request */ diff --git a/src/bfcp/conn.c b/src/bfcp/conn.c index 9875e2c..df175d9 100644 --- a/src/bfcp/conn.c +++ b/src/bfcp/conn.c @@ -146,3 +146,9 @@ int bfcp_send(struct bfcp_conn *bc, const struct sa *dst, struct mbuf *mb) return ENOSYS; } } + + +void *bfcp_sock(const struct bfcp_conn *bc) +{ + return bc ? bc->us : NULL; +}