gtp: Added 'Bearer control mode' information element from Release 7

Submitted by BJovke . on Sept. 14, 2016, 1:12 p.m.

Details

Message ID CACMkyELuKJNrjx8DX3uTEMkK13W66nC2qKj-Vpbzp59BvAR-Aw@mail.gmail.com
State New
Series "gtp: Added 'Bearer control mode' information element from Release 7"
Headers show

Commit Message

BJovke . Sept. 14, 2016, 1:12 p.m.
---
 gtp/gtpie.c | 3 +++
 gtp/gtpie.h | 1 +
 2 files changed, 4 insertions(+)

 /* 252-254 Reserved for the GPRS charging protocol (see GTP' in GSM 12.15)
*/

Patch hide | download patch | download mbox

diff --git a/gtp/gtpie.c b/gtp/gtpie.c
index a45df1c..c8db449 100644
--- a/gtp/gtpie.c
+++ b/gtp/gtpie.c
@@ -243,6 +243,7 @@  int gtpie_decaps(union gtpie_member *ie[], int version,
void *pack,
  case GTPIE_RP_SMS:
  case GTPIE_RP:
  case GTPIE_MS_NOT_REACH:
+ case GTPIE_BCM:
  if (j < GTPIE_SIZE) {
  ie[j] = (union gtpie_member *)p;
  if (GTPIE_DEBUG)
@@ -457,6 +458,7 @@  int gtpie_encaps(union gtpie_member *ie[], void *pack,
unsigned *len)
  case GTPIE_RP_SMS:
  case GTPIE_RP:
  case GTPIE_MS_NOT_REACH:
+ case GTPIE_BCM:
  iesize = 2;
  break;
  case GTPIE_FL_DI: /* TV GTPIE types with value length 2 */
@@ -558,6 +560,7 @@  int gtpie_encaps2(union gtpie_member ie[], unsigned int
size,
  case GTPIE_RP_SMS:
  case GTPIE_RP:
  case GTPIE_MS_NOT_REACH:
+ case GTPIE_BCM:
  iesize = 2;
  break;
  case GTPIE_PFI: /* TV GTPIE types with value length 2 */
diff --git a/gtp/gtpie.h b/gtp/gtpie.h
index 340a76c..fb8598e 100644
--- a/gtp/gtpie.h
+++ b/gtp/gtpie.h
@@ -106,6 +106,7 @@  static __inline uint64_t hton64(uint64_t q)
 #define GTPIE_USER_LOC      152 /* User Location Information  */
 #define GTPIE_MS_TZ         153 /* MS Time Zone */
 #define GTPIE_IMEI_SV       154 /* IMEI Software Version */
+#define GTPIE_BCM           184 /* Bearer control mode */
 /* 239-250 Reserved for the GPRS charging protocol (see GTP' in GSM 12.15)
*/
 #define GTPIE_CHARGING_ADDR 251 /* Charging Gateway Address */

Comments

Neels Hofmeyr Sept. 15, 2016, 11:57 a.m.
I had a lot of trouble applying this patch with 'git am' because your
submission is completely broken. There are line wraps and broken indenting
everywhere.

The patch is also sent in HTML format (besides the plain text version).

How did all this happen?
Did you paste the patch file into some web mail UI?? :)

Since the patch is fairly trivial and to avoid more senseless cycles, I applied
it manually. But next time please post a proper patch, that avoids a lot of
time wasted on a trivial change.

~Neels

> 
> diff --git a/gtp/gtpie.c b/gtp/gtpie.c
> index a45df1c..c8db449 100644
> --- a/gtp/gtpie.c
> +++ b/gtp/gtpie.c
>   case GTPIE_RP_SMS:
>   case GTPIE_RP:
>   case GTPIE_MS_NOT_REACH:
> + case GTPIE_BCM:
>   if (j < GTPIE_SIZE) {
>   ie[j] = (union gtpie_member *)p;
>   if (GTPIE_DEBUG)
> @@ -457,6 +458,7 @@ int gtpie_encaps(union gtpie_member *ie[], void *pack,
> unsigned *len)
>   case GTPIE_RP_SMS:
>   case GTPIE_RP:
>   case GTPIE_MS_NOT_REACH:
> + case GTPIE_BCM:
>   iesize = 2;
>   break;
>   case GTPIE_FL_DI: /* TV GTPIE types with value length 2 */
> @@ -558,6 +560,7 @@ int gtpie_encaps2(union gtpie_member ie[], unsigned int
> size,
>   case GTPIE_RP_SMS:
>   case GTPIE_RP:
>   case GTPIE_MS_NOT_REACH:
> + case GTPIE_BCM:
>   iesize = 2;
>   break;
>   case GTPIE_PFI: /* TV GTPIE types with value length 2 */
> diff --git a/gtp/gtpie.h b/gtp/gtpie.h
> index 340a76c..fb8598e 100644
> --- a/gtp/gtpie.h
> +++ b/gtp/gtpie.h
> @@ -106,6 +106,7 @@ static __inline uint64_t hton64(uint64_t q)
>  #define GTPIE_USER_LOC      152 /* User Location Information  */
>  #define GTPIE_MS_TZ         153 /* MS Time Zone */
>  #define GTPIE_IMEI_SV       154 /* IMEI Software Version */
> +#define GTPIE_BCM           184 /* Bearer control mode */
>  /* 239-250 Reserved for the GPRS charging protocol (see GTP' in GSM 12.15)
> */
>  #define GTPIE_CHARGING_ADDR 251 /* Charging Gateway Address */
>  /* 252-254 Reserved for the GPRS charging protocol (see GTP' in GSM 12.15)
> */
> -- 
> 2.8.2.windows.1
BJovke . Sept. 15, 2016, 2:52 p.m.
Hello.

I'm sorry, you're right, I've pasted it to web mail...
I wasn't aware that you are applying it directly from e-mail.
Linux box I'm working on doesn't have direct access to Internet nor e-mail
server so git doesn't work completely.
I have a Windows machine for that but I haven't configured access to GMail
through SMTP/POP3, I will do that soon.

Again, I'm very sorry, I rarely use git and e-mail patching systems.
I will do my best to do it in a proper way next time.

Thank you for your assistance!

Greetings.




2016-09-15 13:57 GMT+02:00 Neels Hofmeyr <nhofmeyr@sysmocom.de>:

> I had a lot of trouble applying this patch with 'git am' because your
> submission is completely broken. There are line wraps and broken indenting
> everywhere.
>
> The patch is also sent in HTML format (besides the plain text version).
>
> How did all this happen?
> Did you paste the patch file into some web mail UI?? :)
>
> Since the patch is fairly trivial and to avoid more senseless cycles, I
> applied
> it manually. But next time please post a proper patch, that avoids a lot of
> time wasted on a trivial change.
>
> ~Neels
>
> >
> > diff --git a/gtp/gtpie.c b/gtp/gtpie.c
> > index a45df1c..c8db449 100644
> > --- a/gtp/gtpie.c
> > +++ b/gtp/gtpie.c
> >   case GTPIE_RP_SMS:
> >   case GTPIE_RP:
> >   case GTPIE_MS_NOT_REACH:
> > + case GTPIE_BCM:
> >   if (j < GTPIE_SIZE) {
> >   ie[j] = (union gtpie_member *)p;
> >   if (GTPIE_DEBUG)
> > @@ -457,6 +458,7 @@ int gtpie_encaps(union gtpie_member *ie[], void
> *pack,
> > unsigned *len)
> >   case GTPIE_RP_SMS:
> >   case GTPIE_RP:
> >   case GTPIE_MS_NOT_REACH:
> > + case GTPIE_BCM:
> >   iesize = 2;
> >   break;
> >   case GTPIE_FL_DI: /* TV GTPIE types with value length 2 */
> > @@ -558,6 +560,7 @@ int gtpie_encaps2(union gtpie_member ie[], unsigned
> int
> > size,
> >   case GTPIE_RP_SMS:
> >   case GTPIE_RP:
> >   case GTPIE_MS_NOT_REACH:
> > + case GTPIE_BCM:
> >   iesize = 2;
> >   break;
> >   case GTPIE_PFI: /* TV GTPIE types with value length 2 */
> > diff --git a/gtp/gtpie.h b/gtp/gtpie.h
> > index 340a76c..fb8598e 100644
> > --- a/gtp/gtpie.h
> > +++ b/gtp/gtpie.h
> > @@ -106,6 +106,7 @@ static __inline uint64_t hton64(uint64_t q)
> >  #define GTPIE_USER_LOC      152 /* User Location Information  */
> >  #define GTPIE_MS_TZ         153 /* MS Time Zone */
> >  #define GTPIE_IMEI_SV       154 /* IMEI Software Version */
> > +#define GTPIE_BCM           184 /* Bearer control mode */
> >  /* 239-250 Reserved for the GPRS charging protocol (see GTP' in GSM
> 12.15)
> > */
> >  #define GTPIE_CHARGING_ADDR 251 /* Charging Gateway Address */
> >  /* 252-254 Reserved for the GPRS charging protocol (see GTP' in GSM
> 12.15)
> > */
> > --
> > 2.8.2.windows.1
>
> --
> - Neels Hofmeyr <nhofmeyr@sysmocom.de>          http://www.sysmocom.de/
> =======================================================================
> * sysmocom - systems for mobile communications GmbH
> * Alt-Moabit 93
> * 10559 Berlin, Germany
> * Sitz / Registered office: Berlin, HRB 134158 B
> * Geschäftsführer / Managing Directors: Harald Welte
>