goflow icon indicating copy to clipboard operation
goflow copied to clipboard

Option to send Ip addresses fields as String instead of Base64

Open Slepwin opened this issue 4 years ago • 2 comments

Can you add some option to send fields with IP addresses as String instead of Base64.

Slepwin avatar Feb 02 '21 19:02 Slepwin

I also had trouble with this. I think the best option is to just convert the Ip fields yourself.

quick example

var b  flowmessage.FlowMessage = {}
var ip net.IP = b
ipStr := ip.String()

jsirianni avatar Jul 14 '21 19:07 jsirianni

Just realized I missed this issue. The base format is protobuf. It is meant to be decoded programmatically and avoid conversion (performance impact). Changing the field from bytes to string would be a breaking change. I would invite you to check the JSON/text format which converts fields into their proper representation. Have a look at https://github.com/netsampler/goflow2 which has more control over outputs.

lspgn avatar Jul 14 '21 19:07 lspgn