IPv6 struct

This commit is contained in:
Eric Reed 2013-06-25 16:03:24 -07:00
parent 2c5cfe1037
commit d0c812f2a8

View file

@ -8,8 +8,10 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.
type Port = u16;
#[deriving(Eq, TotalEq)]
pub enum IpAddr {
Ipv4(u8, u8, u8, u8, u16),
Ipv6
Ipv4(u8, u8, u8, u8, Port),
Ipv6(u16, u16, u16, u16, u16, u16, u16, u16, Port)
}