go-gtp
go-gtp copied to clipboard
S1MME protocol buffers generation
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 ?
Something might have changed... Adding option go_package = "./";
in s1mme.proto made it compiled successfully at least (not tested as a whole though).
...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.
And now I can dynamically set IP:
if in enb.yml config for src_ip is: