unsignedchardest_mac[ETH_ADR_SIZE]={0x00,0x09,0x6b,0x10,0xf3,0x80};/* other host MAC address, hardcoded...... :-( */
intret=0;
unsignedchardest_mac[ETH_ADR_SIZE]={0x06,0x05,0x04,0x03,0x02,0x01};/* other host MAC address, hardcoded...... :-( */
unsignedcharchn_id=0x01;
unsignedshortfrag_size=60;
unsignedshortfreq=1000;/* milliseconds */
unsignedchardata[200];
char*ifname=argv[1];
char*dest_mac_str=argv[2];
if(parse_MAC_address(dest_mac_str,dest_mac)){
printf("failed to parse dest MAC address\n");
return1;
}
if(-1==thr_init(ifname))
{
printf("Throttle Init failure.");
...
...
@@ -119,7 +106,7 @@ int main(int argc, char *argv[]) {
}elseif(argc==3){
returnencode(argc,argv);
}else{
printf("Usage: \nFor encoding ethN xx:xx:xx:xx:xx:xx\n For decoding ethN\n");
printf("Usage: For encoding ethN xx:xx:xx:xx:xx:xx\nFor decoding ethN\n where ethN is the ethernet interface to use\n and xx:xx:...:xx is the destination MAC address");