IPv6 struct
This commit is contained in:
parent
2c5cfe1037
commit
d0c812f2a8
1 changed files with 4 additions and 2 deletions
|
|
@ -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)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue