pespin submitted this change.

View Change

Approvals: Jenkins Builder: Verified lynxis lazus: Looks good to me, approved laforge: Looks good to me, but someone else must approve
iu_helpers: Constify osmo_sockaddr input param

Change-Id: I86040373c075bbd84c2a21abc61a880e307fd4f8
---
M include/osmocom/ranap/iu_helpers.h
M src/iu_helpers.c
2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/include/osmocom/ranap/iu_helpers.h b/include/osmocom/ranap/iu_helpers.h
index 3a06c4b..f6140a0 100644
--- a/include/osmocom/ranap/iu_helpers.h
+++ b/include/osmocom/ranap/iu_helpers.h
@@ -17,7 +17,7 @@
const RANAP_TransportLayerAddress_t *trasp_layer_addr);
int ranap_transp_layer_addr_decode2(struct osmo_sockaddr *addr, bool *uses_x213_nsap,
const RANAP_TransportLayerAddress_t *trasp_layer_addr);
-RANAP_TransportLayerInformation_t *ranap_new_transp_info_rtp(struct osmo_sockaddr *addr, bool use_x213_nsap);
-RANAP_TransportLayerInformation_t *ranap_new_transp_info_gtp(struct osmo_sockaddr *addr, uint32_t tei,
+RANAP_TransportLayerInformation_t *ranap_new_transp_info_rtp(const struct osmo_sockaddr *addr, bool use_x213_nsap);
+RANAP_TransportLayerInformation_t *ranap_new_transp_info_gtp(const struct osmo_sockaddr *addr, uint32_t tei,
bool use_x213_nsap);
-int ranap_new_transp_layer_addr(BIT_STRING_t *out, struct osmo_sockaddr *addr, bool use_x213_nsap);
+int ranap_new_transp_layer_addr(BIT_STRING_t *out, const struct osmo_sockaddr *addr, bool use_x213_nsap);
diff --git a/src/iu_helpers.c b/src/iu_helpers.c
index 705af31..07b6085 100644
--- a/src/iu_helpers.c
+++ b/src/iu_helpers.c
@@ -194,12 +194,12 @@
return 0;
}

-int ranap_new_transp_layer_addr(BIT_STRING_t *out, struct osmo_sockaddr *addr, bool use_x213_nsap)
+int ranap_new_transp_layer_addr(BIT_STRING_t *out, const struct osmo_sockaddr *addr, bool use_x213_nsap)
{
uint8_t *buf;
unsigned int len;
size_t ip_len;
- uint8_t *ip_addr;
+ const uint8_t *ip_addr;
uint16_t icp;

switch (addr->u.sa.sa_family) {
@@ -244,7 +244,7 @@
return 0;
}

-RANAP_TransportLayerInformation_t *ranap_new_transp_info_rtp(struct osmo_sockaddr *addr, bool use_x213_nsap)
+RANAP_TransportLayerInformation_t *ranap_new_transp_info_rtp(const struct osmo_sockaddr *addr, bool use_x213_nsap)
{
RANAP_TransportLayerInformation_t *tli;
uint8_t binding_id[4] = { 0 };
@@ -275,7 +275,7 @@
return tli;
}

-RANAP_TransportLayerInformation_t *ranap_new_transp_info_gtp(struct osmo_sockaddr *addr, uint32_t tei,
+RANAP_TransportLayerInformation_t *ranap_new_transp_info_gtp(const struct osmo_sockaddr *addr, uint32_t tei,
bool use_x213_nsap)
{
RANAP_TransportLayerInformation_t *tli = CALLOC(1, sizeof(*tli));

To view, visit change 43256. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-MessageType: merged
Gerrit-Project: osmo-iuh
Gerrit-Branch: master
Gerrit-Change-Id: I86040373c075bbd84c2a21abc61a880e307fd4f8
Gerrit-Change-Number: 43256
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin@sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy@sysmocom.de>
Gerrit-Reviewer: laforge <laforge@osmocom.org>
Gerrit-Reviewer: lynxis lazus <lynxis@fe80.eu>
Gerrit-Reviewer: osmith <osmith@sysmocom.de>
Gerrit-Reviewer: pespin <pespin@sysmocom.de>