diff options
author | Alexander Couzens <lynxis@fe80.eu> | 2021-07-20 18:41:14 +0200 |
---|---|---|
committer | Alexander Couzens <lynxis@fe80.eu> | 2021-08-06 19:32:12 +0200 |
commit | 0d565fa00c8739216f3e2a13e736496d3feadd3f (patch) | |
tree | b752efe4641694d38007032403d635c8cf9aee53 | |
parent | c7e035ca5951eb47d5fe792b1066a5b2d815adba (diff) |
gprs_ns2: move sns_event into internal.h to direct emit events
Creating just a proxy function seems more overhead instead of calling it direct.
Change-Id: I8e3fae4367c112b5a71bffb33c302d903855cddc
-rw-r--r-- | src/gb/gprs_ns2_internal.h | 17 | ||||
-rw-r--r-- | src/gb/gprs_ns2_sns.c | 17 | ||||
-rw-r--r-- | src/gb/gprs_ns_sns.c | 2 |
3 files changed, 18 insertions, 18 deletions
diff --git a/src/gb/gprs_ns2_internal.h b/src/gb/gprs_ns2_internal.h index 95efbae7..fb84651d 100644 --- a/src/gb/gprs_ns2_internal.h +++ b/src/gb/gprs_ns2_internal.h @@ -320,6 +320,23 @@ struct gprs_ns2_vc_driver { void (*free_bind)(struct gprs_ns2_vc_bind *driver); }; +enum gprs_ns2_sns_event { + GPRS_SNS_EV_REQ_SELECT_ENDPOINT, /*!< Select a SNS endpoint from the list */ + GPRS_SNS_EV_RX_SIZE, + GPRS_SNS_EV_RX_SIZE_ACK, + GPRS_SNS_EV_RX_CONFIG, + GPRS_SNS_EV_RX_CONFIG_END, /*!< SNS-CONFIG with end flag received */ + GPRS_SNS_EV_RX_CONFIG_ACK, + GPRS_SNS_EV_RX_ADD, + GPRS_SNS_EV_RX_DELETE, + GPRS_SNS_EV_RX_CHANGE_WEIGHT, + GPRS_SNS_EV_RX_ACK, /*!< Rx of SNS-ACK (response to ADD/DELETE/CHG_WEIGHT */ + GPRS_SNS_EV_REQ_NO_NSVC, /*!< no more NS-VC remaining (all dead) */ + GPRS_SNS_EV_REQ_NSVC_ALIVE, /*!< a NS-VC became alive */ + GPRS_SNS_EV_REQ_ADD_BIND, /*!< add a new local bind to this NSE */ + GPRS_SNS_EV_REQ_DELETE_BIND, /*!< remove a local bind from this NSE */ +}; + enum ns2_cs ns2_create_vc(struct gprs_ns2_vc_bind *bind, struct msgb *msg, const struct osmo_sockaddr *remote, diff --git a/src/gb/gprs_ns2_sns.c b/src/gb/gprs_ns2_sns.c index a9ace5f9..b856eabe 100644 --- a/src/gb/gprs_ns2_sns.c +++ b/src/gb/gprs_ns2_sns.c @@ -72,23 +72,6 @@ enum gprs_sns_bss_state { GPRS_SNS_ST_SGSN_WAIT_CONFIG_ACK, /* !< SGSN role: Wait for CONFIG-ACK from BSS */ }; -enum gprs_sns_event { - GPRS_SNS_EV_REQ_SELECT_ENDPOINT, /*!< Select a SNS endpoint from the list */ - GPRS_SNS_EV_RX_SIZE, - GPRS_SNS_EV_RX_SIZE_ACK, - GPRS_SNS_EV_RX_CONFIG, - GPRS_SNS_EV_RX_CONFIG_END, /*!< SNS-CONFIG with end flag received */ - GPRS_SNS_EV_RX_CONFIG_ACK, - GPRS_SNS_EV_RX_ADD, - GPRS_SNS_EV_RX_DELETE, - GPRS_SNS_EV_RX_CHANGE_WEIGHT, - GPRS_SNS_EV_RX_ACK, /*!< Rx of SNS-ACK (response to ADD/DELETE/CHG_WEIGHT */ - GPRS_SNS_EV_REQ_NO_NSVC, /*!< no more NS-VC remaining (all dead) */ - GPRS_SNS_EV_REQ_NSVC_ALIVE, /*!< a NS-VC became alive */ - GPRS_SNS_EV_REQ_ADD_BIND, /*!< add a new local bind to this NSE */ - GPRS_SNS_EV_REQ_DELETE_BIND, /*!< remove a local bind from this NSE */ -}; - static const struct value_string gprs_sns_event_names[] = { { GPRS_SNS_EV_REQ_SELECT_ENDPOINT, "REQ_SELECT_ENDPOINT" }, { GPRS_SNS_EV_RX_SIZE, "RX_SIZE" }, diff --git a/src/gb/gprs_ns_sns.c b/src/gb/gprs_ns_sns.c index aa8b121a..93ebf9a6 100644 --- a/src/gb/gprs_ns_sns.c +++ b/src/gb/gprs_ns_sns.c @@ -273,7 +273,7 @@ enum gprs_sns_bss_state { GPRS_SNS_ST_CONFIGURED, }; -enum gprs_sns_event { +enum gprs_ns2_sns_event { GPRS_SNS_EV_START, GPRS_SNS_EV_SIZE, GPRS_SNS_EV_SIZE_ACK, |