pespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmo-pfcp/+/38613?usp=email )
Change subject: pfcp: add API osmo_pfcp_cp_peer_set_associated_cb() ......................................................................
pfcp: add API osmo_pfcp_cp_peer_set_associated_cb()
Change-Id: Ibc8047856ddcc9c71f2b4cf30f577862b6b414ca --- M TODO-RELEASE M include/osmocom/pfcp/pfcp_cp_peer.h M src/libosmo-pfcp/pfcp_cp_peer.c 3 files changed, 8 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmo-pfcp refs/changes/13/38613/1
diff --git a/TODO-RELEASE b/TODO-RELEASE index 0ed7189..8f3b43c 100644 --- a/TODO-RELEASE +++ b/TODO-RELEASE @@ -7,3 +7,4 @@ # If any interfaces have been added since the last public release: c:r:a + 1. # If any interfaces have been removed or changed since the last public release: c:r:0. #library what description / commit summary line +libosmo-pfcp add API osmo_pfcp_cp_peer_set_associated_cb() diff --git a/include/osmocom/pfcp/pfcp_cp_peer.h b/include/osmocom/pfcp/pfcp_cp_peer.h index 85647d6..de879de 100644 --- a/include/osmocom/pfcp/pfcp_cp_peer.h +++ b/include/osmocom/pfcp/pfcp_cp_peer.h @@ -41,6 +41,7 @@ const struct osmo_sockaddr *remote_addr); int osmo_pfcp_cp_peer_associate(struct osmo_pfcp_cp_peer *cp_peer); bool osmo_pfcp_cp_peer_is_associated(const struct osmo_pfcp_cp_peer *cp_peer); +int osmo_pfcp_cp_peer_set_associated_cb(const struct osmo_pfcp_cp_peer *cp_peer, osmo_pfcp_cp_peer_assoc_cb assoc_cb); struct osmo_pfcp_msg *osmo_pfcp_cp_peer_new_req(struct osmo_pfcp_cp_peer *cp_peer, enum osmo_pfcp_message_type msg_type); struct osmo_pfcp_msg *osmo_pfcp_cp_peer_new_resp(struct osmo_pfcp_cp_peer *cp_peer, diff --git a/src/libosmo-pfcp/pfcp_cp_peer.c b/src/libosmo-pfcp/pfcp_cp_peer.c index 77a59d5..aa2c9d0 100644 --- a/src/libosmo-pfcp/pfcp_cp_peer.c +++ b/src/libosmo-pfcp/pfcp_cp_peer.c @@ -139,6 +139,12 @@ return 0; }
+int osmo_pfcp_cp_peer_set_associated_cb(const struct osmo_pfcp_cp_peer *cp_peer, osmo_pfcp_cp_peer_assoc_cb assoc_cb) +{ + cp_peer->assoc_cb = assoc_cb; + return 0; +} + static int pfcp_cp_peer_fsm_timer_cb(struct osmo_fsm_inst *fi) { switch (fi->state) {