Attention is currently required from: daniel, laforge.
lynxis lazus has posted comments on this change by lynxis lazus. ( https://gerrit.osmocom.org/c/osmo-ggsn/+/38938?usp=email )
Change subject: gtp: add support for SGSN Context Req/Resp/Ack
......................................................................
Patch Set 11:
(6 comments)
File gtp/gtp.c:
https://gerrit.osmocom.org/c/osmo-ggsn/+/38938/comment/8463873f_6e6ee15c?us… :
PS11, Line 899: struct
> Im surprised that the destination peer is not 'const'. […]
Done
https://gerrit.osmocom.org/c/osmo-ggsn/+/38938/comment/a57376db_706b878f?us… :
PS11, Line 1134: int gtp_decode_pdp_ctx(const uint8_t *buf, unsigned int size, struct pdp_t *pdp, uint16_t *sapi)
> I think the function could deserve some documentation as a comment [doxygen style or not]
Done
https://gerrit.osmocom.org/c/osmo-ggsn/+/38938/comment/eddf1ca0_005a917d?us… :
PS11, Line 1273: int gtp_encode_pdp_ctx(uint8_t *buf, unsigned int size, const struct pdp_t *pdp, uint16_t sapi)
> I think the function could deserve some documentation as a comment [doxygen style or not]
Done
https://gerrit.osmocom.org/c/osmo-ggsn/+/38938/comment/108ae602_a0116865?us… :
PS11, Line 1403: LOGP(DLGTP, LOGL_NOTICE,
> shouldn't we print some kind of context? Like which GSN peer (address) has sent us the message with […]
Done
https://gerrit.osmocom.org/c/osmo-ggsn/+/38938/comment/2cf5f4bb_a9a10cea?us… :
PS11, Line 1410: "SGSN Context Response expected Sequence flag set. Flags %d\n", packet->flags);
> shouldn't we print some kind of context? Like which GSN peer (address) has sent us the message with […]
Done
https://gerrit.osmocom.org/c/osmo-ggsn/+/38938/comment/ee9b8d06_77d3c7d6?us… :
PS11, Line 1458: "SGSN Context Request expected only on GTPCv1: %u\n", version);
> same here
Done
--
To view, visit https://gerrit.osmocom.org/c/osmo-ggsn/+/38938?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: osmo-ggsn
Gerrit-Branch: master
Gerrit-Change-Id: Idb8ed0bb87200a68bb8caedd734fc070df9179c0
Gerrit-Change-Number: 38938
Gerrit-PatchSet: 11
Gerrit-Owner: lynxis lazus <lynxis(a)fe80.eu>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: daniel <dwillmann(a)sysmocom.de>
Gerrit-CC: laforge <laforge(a)osmocom.org>
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: daniel <dwillmann(a)sysmocom.de>
Gerrit-Comment-Date: Wed, 04 Jun 2025 16:24:18 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: laforge <laforge(a)osmocom.org>
Attention is currently required from: pespin.
lynxis lazus has posted comments on this change by lynxis lazus. ( https://gerrit.osmocom.org/c/osmo-ggsn/+/40432?usp=email )
Change subject: gtpie: make ies const for getter
......................................................................
Patch Set 1:
(1 comment)
File include/osmocom/gtp/gtpie.h:
https://gerrit.osmocom.org/c/osmo-ggsn/+/40432/comment/e2e38284_992388a2?us… :
PS1, Line 304: extern int gtpie_getie(union gtpie_member * const ie[], int type, int instance);
> you can also consitfy the union pointer I guess?
Should I? I'm unsure.
--
To view, visit https://gerrit.osmocom.org/c/osmo-ggsn/+/40432?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: osmo-ggsn
Gerrit-Branch: master
Gerrit-Change-Id: I43195314b1cf416a1f2fd4d3ddd48c4eee462b0b
Gerrit-Change-Number: 40432
Gerrit-PatchSet: 1
Gerrit-Owner: lynxis lazus <lynxis(a)fe80.eu>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Wed, 04 Jun 2025 16:24:04 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Attention is currently required from: lynxis lazus.
pespin has posted comments on this change by lynxis lazus. ( https://gerrit.osmocom.org/c/osmo-ggsn/+/40432?usp=email )
Change subject: gtpie: make ies const for getter
......................................................................
Patch Set 1:
(1 comment)
File include/osmocom/gtp/gtpie.h:
https://gerrit.osmocom.org/c/osmo-ggsn/+/40432/comment/0c97aa9e_976a7f2a?us… :
PS1, Line 304: extern int gtpie_getie(union gtpie_member * const ie[], int type, int instance);
you can also consitfy the union pointer I guess?
--
To view, visit https://gerrit.osmocom.org/c/osmo-ggsn/+/40432?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: osmo-ggsn
Gerrit-Branch: master
Gerrit-Change-Id: I43195314b1cf416a1f2fd4d3ddd48c4eee462b0b
Gerrit-Change-Number: 40432
Gerrit-PatchSet: 1
Gerrit-Owner: lynxis lazus <lynxis(a)fe80.eu>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: lynxis lazus <lynxis(a)fe80.eu>
Gerrit-Comment-Date: Wed, 04 Jun 2025 15:45:07 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
lynxis lazus has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-ggsn/+/40432?usp=email )
Change subject: gtpie: make ies const for getter
......................................................................
gtpie: make ies const for getter
Getter's don't modify the ie.
Making it const is compatible with previous versions.
Change-Id: I43195314b1cf416a1f2fd4d3ddd48c4eee462b0b
---
M gtp/gtpie.c
M include/osmocom/gtp/gtpie.h
2 files changed, 22 insertions(+), 22 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-ggsn refs/changes/32/40432/1
diff --git a/gtp/gtpie.c b/gtp/gtpie.c
index 84a3ec2..1d2d4d2 100644
--- a/gtp/gtpie.c
+++ b/gtp/gtpie.c
@@ -155,7 +155,7 @@
* \param[in] type Tag/IEI for which we're looking
* \param[in] instance Instance (number of occurence) of this IEI
* \returns index into \a ie on success; -1 if not found */
-int gtpie_getie(union gtpie_member *ie[], int type, int instance)
+int gtpie_getie(union gtpie_member * const ie[], int type, int instance)
{
int j;
for (j = 0; j < GTPIE_SIZE; j++) {
@@ -172,7 +172,7 @@
* \param[in] type Tag/IEI for which we're looking
* \param[in] instance Instance (number of occurence) of this IEI
* \returns 1 if IEI instance present in \a ie; 0 if not */
-int gtpie_exist(union gtpie_member *ie[], int type, int instance)
+int gtpie_exist(union gtpie_member * const ie[], int type, int instance)
{
int j;
for (j = 0; j < GTPIE_SIZE; j++) {
@@ -192,7 +192,7 @@
* \param[inout] dst Caller-allocated buffer where to store value
* \param[in] size Size of \a dst in bytes
* \returns 0 on sucess; EOF in case value is larger than \a size */
-int gtpie_gettlv(union gtpie_member *ie[], int type, int instance,
+int gtpie_gettlv(union gtpie_member * const ie[], int type, int instance,
unsigned int *length, void *dst, unsigned int size)
{
int ien;
@@ -214,7 +214,7 @@
* \param[inout] dst Caller-allocated buffer where to store value
* \param[in] size Size of value in bytes
* \returns 0 on sucess; EOF in case IE not found */
-int gtpie_gettv0(union gtpie_member *ie[], int type, int instance,
+int gtpie_gettv0(union gtpie_member * const ie[], int type, int instance,
void *dst, unsigned int size)
{
int ien;
@@ -232,7 +232,7 @@
* \param[in] instance Instance (number of occurence) of this IEI
* \param[inout] dst Caller-allocated buffer where to store value
* \returns 0 on sucess; EOF in case IE not found */
-int gtpie_gettv1(union gtpie_member *ie[], int type, int instance,
+int gtpie_gettv1(union gtpie_member * const ie[], int type, int instance,
uint8_t * dst)
{
int ien;
@@ -250,7 +250,7 @@
* \param[in] instance Instance (number of occurence) of this IEI
* \param[inout] dst Caller-allocated buffer where to store value
* \returns 0 on sucess; EOF in case IE not found */
-int gtpie_gettv2(union gtpie_member *ie[], int type, int instance,
+int gtpie_gettv2(union gtpie_member * const ie[], int type, int instance,
uint16_t * dst)
{
int ien;
@@ -268,7 +268,7 @@
* \param[in] instance Instance (number of occurence) of this IEI
* \param[inout] dst Caller-allocated buffer where to store value
* \returns 0 on sucess; EOF in case IE not found */
-int gtpie_gettv4(union gtpie_member *ie[], int type, int instance,
+int gtpie_gettv4(union gtpie_member * const ie[], int type, int instance,
uint32_t * dst)
{
int ien;
@@ -286,7 +286,7 @@
* \param[in] instance Instance (number of occurence) of this IEI
* \param[inout] dst Caller-allocated buffer where to store value
* \returns 0 on sucess; EOF in case IE not found */
-int gtpie_gettv8(union gtpie_member *ie[], int type, int instance,
+int gtpie_gettv8(union gtpie_member * const ie[], int type, int instance,
uint64_t * dst)
{
int ien;
@@ -599,7 +599,7 @@
* \param[out] pack Pointer to caller-allocated buffer for raw GTP packet (GTPIE_MAX length)
* \param[out] len Encoded length of \a pack in bytes
* \returns 0 on sucess; 2 for out-of-space */
-int gtpie_encaps(union gtpie_member *ie[], void *pack, unsigned *len)
+int gtpie_encaps(union gtpie_member * const ie[], void *pack, unsigned *len)
{
int i;
unsigned char *p;
@@ -774,7 +774,7 @@
* \param[out] pack Pointer to caller-allocated buffer for raw GTP packet (GTPIE_MAX length)
* \param[out] len Encoded length of \a pack in bytes
* \returns 0 on sucess; 2 for out-of-space */
-int gtpie_encaps2(union gtpie_member ie[], unsigned int size,
+int gtpie_encaps2(const union gtpie_member ie[], unsigned int size,
void *pack, unsigned *len)
{
unsigned int i, j;
@@ -953,7 +953,7 @@
* \param[out] encoded_len Encoded length of \a pack in bytes
* \returns 0 on success; 2 for out-of-space
* GTP requires a certain order, the call must follow those which are defined for every message */
-int gtpie_encaps3(union gtpie_member *ies[], unsigned int ie_len,
+int gtpie_encaps3(union gtpie_member * const ies[], unsigned int ie_len,
void *pack, unsigned pack_len, unsigned *encoded_len)
{
unsigned int i;
diff --git a/include/osmocom/gtp/gtpie.h b/include/osmocom/gtp/gtpie.h
index b3e3ddf..b412159 100644
--- a/include/osmocom/gtp/gtpie.h
+++ b/include/osmocom/gtp/gtpie.h
@@ -301,27 +301,27 @@
uint8_t t, uint32_t v);
extern int gtpie_tv8(void *p, unsigned int *length, unsigned int size,
uint8_t t, uint64_t v);
-extern int gtpie_getie(union gtpie_member *ie[], int type, int instance);
-extern int gtpie_exist(union gtpie_member *ie[], int type, int instance);
-extern int gtpie_gettlv(union gtpie_member *ie[], int type, int instance,
+extern int gtpie_getie(union gtpie_member * const ie[], int type, int instance);
+extern int gtpie_exist(union gtpie_member * const ie[], int type, int instance);
+extern int gtpie_gettlv(union gtpie_member * const ie[], int type, int instance,
unsigned int *length, void *dst, unsigned int size);
-extern int gtpie_gettv0(union gtpie_member *ie[], int type, int instance,
+extern int gtpie_gettv0(union gtpie_member * const ie[], int type, int instance,
void *dst, unsigned int size);
-extern int gtpie_gettv1(union gtpie_member *ie[], int type, int instance,
+extern int gtpie_gettv1(union gtpie_member * const ie[], int type, int instance,
uint8_t * dst);
-extern int gtpie_gettv2(union gtpie_member *ie[], int type, int instance,
+extern int gtpie_gettv2(union gtpie_member * const ie[], int type, int instance,
uint16_t * dst);
-extern int gtpie_gettv4(union gtpie_member *ie[], int type, int instance,
+extern int gtpie_gettv4(union gtpie_member * const ie[], int type, int instance,
uint32_t * dst);
-extern int gtpie_gettv8(union gtpie_member *ie[], int type, int instance,
+extern int gtpie_gettv8(union gtpie_member * const ie[], int type, int instance,
uint64_t * dst);
extern int gtpie_decaps(union gtpie_member *ie[], int version,
const void *pack, unsigned len);
-extern int gtpie_encaps(union gtpie_member *ie[], void *pack, unsigned *len);
-extern int gtpie_encaps2(union gtpie_member ie[], unsigned int size,
+extern int gtpie_encaps(union gtpie_member * const ie[], void *pack, unsigned *len);
+extern int gtpie_encaps2(const union gtpie_member ie[], unsigned int size,
void *pack, unsigned *len);
-extern int gtpie_encaps3(union gtpie_member *ie[], unsigned int ie_len,
+extern int gtpie_encaps3(union gtpie_member * const ie[], unsigned int ie_len,
void *pack, unsigned pack_len, unsigned *encoded_len);
#endif /* !_GTPIE_H */
--
To view, visit https://gerrit.osmocom.org/c/osmo-ggsn/+/40432?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: osmo-ggsn
Gerrit-Branch: master
Gerrit-Change-Id: I43195314b1cf416a1f2fd4d3ddd48c4eee462b0b
Gerrit-Change-Number: 40432
Gerrit-PatchSet: 1
Gerrit-Owner: lynxis lazus <lynxis(a)fe80.eu>
Attention is currently required from: osmith.
pespin has posted comments on this change by osmith. ( https://gerrit.osmocom.org/c/osmo-ci/+/40430?usp=email )
Change subject: OBS: let meta package depend on osmocom-keyring
......................................................................
Patch Set 1: Code-Review+1
--
To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/40430?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Change-Id: Id4d213f355338b39a9ec5ccffc16179f6e472102
Gerrit-Change-Number: 40430
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: osmith <osmith(a)sysmocom.de>
Gerrit-Comment-Date: Wed, 04 Jun 2025 14:17:21 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes