8 IPAddr ip1(0x0a0a0a05);
9 IPAddr ip2("10.10.10.1");
10 IPAddr ip3(10, 10, 10, 2);
11 std::cout << "IP1 = " << ip1 << "\n";
12 std::cout << "IP2 = " << ip2 << "\n";
13 std::cout << "IP3 = " << ip3 << "\n";
15 IPHeader h1(4, 20, 1, 1, 0, 0, 64, 0x11, ip1, ip2);
16 std::cout << "Header1 = " << h1 << "\n";
17 if (h1.check_checksum())
18 std::cout << "Checksum OK\n";
20 std::cout << "Checksum MAL!\n";
22 if (h1.check_checksum())
23 std::cout << "Checksum OK\n";
25 std::cout << "Checksum MAL!\n";
29 // vim: set et sw=4 sts=4 :