-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathfunctiontest.sh
More file actions
executable file
·62 lines (42 loc) · 1.83 KB
/
functiontest.sh
File metadata and controls
executable file
·62 lines (42 loc) · 1.83 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#!/bin/bash
echo "Testing IPv4 to IPv6 conversion..."
go run ipv6utils.go -s 100.64.1.1
echo "Testing IPv6 to IPv4 conversion..."
go run ipv6utils.go -s 64:ff9b::c0a8:101
echo "Testing SLAAC MAC address decoding..."
go run ipv6utils.go -m 3fff:0::0200:5eff:fe00:5325
echo "Testing subnet generation..."
go run ipv6utils.go -p 3fff:0::/32 -n 40 -l 5
echo "Testing prefix count..."
go run ipv6utils.go -p 3fff:0::/32 -n 40 -c
echo "Testing output to file..."
go run ipv6utils.go -p 3fff:0::/32 -n 36 -o subnets.txt
cat subnets.txt
echo "Testing alias flags..."
go run ipv6utils.go -p 3fff:0::/32 -n 40 -l 5
#go run ipv6utils.go -prefix 3fff:0::/32 -new-prefix-length 40 -limit 5
echo "Testing link MAC to local decoder..."
go run ipv6utils.go -local 00:11:22:33:44:55
echo "Testing link local to MAC decoder..."
go run ipv6utils.go -local fe80::0211:22ff:fe33:4455
echo "Testing DNS PTR generation on /56 boundary..."
go run ipv6utils.go -ip6.arpa 3fff:0:abcd::0211:22ff:fe33:4455 -n 56
echo "Testing DNS PTR generation..."
go run ipv6utils.go -ip6.arpa 3fff:0:abcd::0211:22ff:fe33:4455 -n 0
echo "Testing IPv6 format display (no prefix)..."
go run ipv6utils.go -f 2001:db8::1
echo "Testing IPv6 format display with /48 prefix (network range + host ID)..."
go run ipv6utils.go -format 2001:db8::1/48
echo "Testing IPv6 format display with /64 prefix..."
go run ipv6utils.go -f fe80::aabb:ccff:fedd:eeff/64
echo "Testing IPv6 format display for loopback..."
go run ipv6utils.go -f ::1
echo "Testing IPv6 format display for IPv4-mapped (shows IPv4-in-IPv6 line)..."
go run ipv6utils.go -f ::ffff:192.0.2.1
echo "Testing IPv6 format display for ULA with prefix..."
go run ipv6utils.go -f fd12:3456:789a::1/48
echo "Testing version flag..."
go run ipv6utils.go -version
echo "Testing version alias flag..."
go run ipv6utils.go -v
echo "All tests completed."