Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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 join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants