Skip to content
This repository was archived by the owner on Feb 19, 2025. It is now read-only.

Option to send Ip addresses fields as String instead of Base64 #91

Open
Slepwin opened this issue Feb 2, 2021 · 2 comments
Open

Option to send Ip addresses fields as String instead of Base64 #91

Slepwin opened this issue Feb 2, 2021 · 2 comments

Comments

@Slepwin
Copy link

Slepwin commented Feb 2, 2021

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

@jsirianni
Copy link

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()

@lspgn
Copy link
Contributor

lspgn commented Jul 14, 2021

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants