+ unsigned mtu = 25;
+ bool router = false;
+ bool forward = false;
+ unsigned proto = 0;
+ key_t queue_id = DEV_DEFAULT_KEY;
+ if (argc > 1)
+ addr = IPAddr(argv[1]);
+ if (argc > 2)
+ mtu = atoi(argv[2]);
+ if (argc > 3)
+ router = atoi(argv[3]);
+ if (argc > 4)
+ forward = atoi(argv[4]);
+ if (argc > 5)
+ proto = atoi(argv[5]);
+ if (argc > 6)
+ queue_id = atoi(argv[6]);
+ Dev dev(addr, mtu, queue_id);
+ int que_id = msgget(queue_id+1, IPC_CREAT | 0666);
+ assert(que_id != -1);
+ Dev fwque(addr, DEV_MAX_MTU, queue_id+1);
+ IPIn ipin(addr, dev, fwque, router, forward, std::cerr);