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

Decode more flow record types #2

Open
3 of 13 tasks
Preetam opened this issue May 20, 2014 · 2 comments
Open
3 of 13 tasks

Decode more flow record types #2

Preetam opened this issue May 20, 2014 · 2 comments
Labels

Comments

@Preetam
Copy link
Member

Preetam commented May 20, 2014

Missing:

  • TypeEthernetFrameFlow = 2
  • TypeIpv6Flow = 4
  • TypeExtendedRouterFlow = 1002
  • TypeExtendedGatewayFlow = 1003
  • TypeExtendedUserFlow = 1004
  • TypeExtendedUrlFlow = 1005
  • TypeExtendedMlpsFlow = 1006
  • TypeExtendedNatFlow = 1007
  • TypeExtendedMlpsTunnelFlow = 1008
  • TypeExtendedMlpsVcFlow = 1009
  • TypeExtendedMlpsFecFlow = 1010
  • TypeExtendedMlpsLvpFecFlow = 1011
  • TypeExtendedVlanFlow = 1012
@Preetam
Copy link
Member Author

Preetam commented Aug 23, 2014

I think this loop needs to keep some sort of state to know if we're dealing with an IPv4 or IPv6 address. The spec shows it as a union:

/* Address types */

typedef opaque ip_v4[4];
typedef opaque ip_v6[16];

enum address_type {
   UNKNOWN  = 0,
   IP_V4    = 1,
   IP_V6    = 2
}

union address (address_type type) {
   case UNKNOWN:
     void;
   case IP_V4:
     ip_v4;
   case IP_V6:
     ip_v6;
}

In that case, I think maybe we can just treat it as a [16]byte and decode it. Is it possible to just look at a [16]byte and tell if it's a v4 or v6 address?

@Preetam
Copy link
Member Author

Preetam commented Aug 26, 2014

Note that in this documentation, referring to an IP address
as an IPv4 address or an IPv6 address is a semantic property
of the address, not just the length of the byte slice: a 16-byte
slice can still be an IPv4 address.
http://golang.org/pkg/net/#IP

Good enough for me.

@Preetam Preetam added the ready label Feb 4, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant