|
@@ -1,50 +0,0 @@
|
1
|
|
-package main
|
2
|
|
-
|
3
|
|
-import (
|
4
|
|
- "log"
|
5
|
|
- "net"
|
6
|
|
-)
|
7
|
|
-
|
8
|
|
-func main() {
|
9
|
|
- log.Println(net.IPv4Mask(255, 240, 0, 0))
|
10
|
|
- for i := 0; i < 8*net.IPv4len; i++ {
|
11
|
|
- log.Println(net.CIDRMask(8*net.IPv4len-i, 8*net.IPv4len))
|
12
|
|
- }
|
13
|
|
-
|
14
|
|
- for _, value := range []net.IPMask{
|
15
|
|
- net.IPv4Mask(255, 255, 255, 255),
|
16
|
|
- net.IPv4Mask(255, 255, 255, 252),
|
17
|
|
- net.IPv4Mask(255, 255, 255, 248),
|
18
|
|
- net.IPv4Mask(255, 255, 255, 240),
|
19
|
|
- net.IPv4Mask(255, 255, 255, 224),
|
20
|
|
- net.IPv4Mask(255, 255, 255, 192),
|
21
|
|
- net.IPv4Mask(255, 255, 255, 128),
|
22
|
|
- net.IPv4Mask(255, 255, 255, 0),
|
23
|
|
- net.IPv4Mask(255, 255, 254, 0),
|
24
|
|
- net.IPv4Mask(255, 255, 252, 0),
|
25
|
|
- net.IPv4Mask(255, 255, 248, 0),
|
26
|
|
- net.IPv4Mask(255, 255, 240, 0),
|
27
|
|
- net.IPv4Mask(255, 255, 224, 0),
|
28
|
|
- net.IPv4Mask(255, 255, 192, 0),
|
29
|
|
- net.IPv4Mask(255, 255, 128, 0),
|
30
|
|
- net.IPv4Mask(255, 255, 0, 0),
|
31
|
|
- net.IPv4Mask(255, 254, 0, 0),
|
32
|
|
- net.IPv4Mask(255, 252, 0, 0),
|
33
|
|
- net.IPv4Mask(255, 248, 0, 0),
|
34
|
|
- net.IPv4Mask(255, 240, 0, 0),
|
35
|
|
- net.IPv4Mask(255, 224, 0, 0),
|
36
|
|
- net.IPv4Mask(255, 192, 0, 0),
|
37
|
|
- net.IPv4Mask(255, 128, 0, 0),
|
38
|
|
- net.IPv4Mask(255, 0, 0, 0),
|
39
|
|
- net.IPv4Mask(254, 0, 0, 0),
|
40
|
|
- net.IPv4Mask(252, 0, 0, 0),
|
41
|
|
- net.IPv4Mask(248, 0, 0, 0),
|
42
|
|
- net.IPv4Mask(240, 0, 0, 0),
|
43
|
|
- net.IPv4Mask(224, 0, 0, 0),
|
44
|
|
- net.IPv4Mask(192, 0, 0, 0),
|
45
|
|
- net.IPv4Mask(128, 0, 0, 0),
|
46
|
|
- } {
|
47
|
|
- log.Println(value)
|
48
|
|
- }
|
49
|
|
-
|
50
|
|
-}
|