You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?
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
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
The text was updated successfully, but these errors were encountered: