fiorix / go-diameter

Diameter stack and Base Protocol (RFC 6733) for the Go programming language
Other
252 stars 143 forks source link

SGSN-Address decode via Struct #196

Open helioaymoto opened 6 months ago

helioaymoto commented 6 months ago

Hi Guys,

I am trying to map some AVPs from a CCR, but I am not able to handle the SGSN-Address to the actual IP address. In the wireshark I can see the AVPs reaching my APP as: I have the following structs to map the AVPs from CCR:

type CCRDecode struct { : ServiceInformation ServiceInformation avp:"Service-Information" } type ServiceInformation struct { PSInformation PSInformation avp:"PS-Information" } type PSInformation struct { SGSNAddress datatype.Address avp:"SGSN-Address" }

From the wireshark, I am getting: image

but when Im checking what I have in the struct: => SGSNAddress as datatype.OctectString: "ServiceInformation": { "PSInformation": { "SGSNAddress": "\ufffd\u003ej\r" } }

=> SGSNAddress as datatype.Address: "ServiceInformation": { "PSInformation": { "SGSNAddress": "yD5qDQ==" } } Can you suggest if there is someway easy that I can have it in IP format.

Kind regards.