go-gtp icon indicating copy to clipboard operation
go-gtp copied to clipboard

S1MME protocol buffers generation

Open northmirko opened this issue 3 years ago • 1 comments

Hi, I want to extend the following code in s1mme.proto :

message AttachResponse {
    Cause cause = 1; // result
    string sgw_addr = 2;
    uint32 o_tei = 3;
    **string user_ip = 4;**////I want to return this from IE END-USER-ADDRESS
}

But cant generate s1mme.pb.go. What command do you use to generate this file? I tried (after some basic research on protocol buffers) protoc -I=. --go_out=s1mme s1mme/s1mme.proto

But s1mme.AttacherClient, s1mme.AttacherServer are not generated. I don't know how to use Protocol Buffers, at the moment. I haven't got experience from that API yet. Hoping you can help with this small extension @wmnsk ?

northmirko avatar Jan 03 '22 12:01 northmirko

Something might have changed... Adding option go_package = "./"; in s1mme.proto made it compiled successfully at least (not tested as a whole though).

wmnsk avatar Jan 06 '22 09:01 wmnsk

...one year after.... I don't know what happened last time, with basic manipulation of protoc and protoc-gen-go protoc --proto_path=. --go_out=. --go_opt=paths=source_relative s1mme.proto code is changed.

image

image

And now I can dynamically set IP: image

if in enb.yml config for src_ip is:

image

northmirko avatar Feb 17 '23 12:02 northmirko