# insert static arp in sorce code "route.c"?



## yousif (Jul 20, 2011)

Hello,

I work with a network simulation program with an extra module called OMNeT and oppBSd. In this module the freebsd tcp/ip stack has been implemented.

how and where I can write the mac and IP address of the Destination dierektly in source code "route.c" assign, so that the route initialized without sending an arp query?
In this program one can not enter the mac and ip address by "arp-s", because the simulator happens in a virtual field of OMNeT.

I've been looking for a Documation of the source code in web but not found, can someone please tell me, where can i find such doumentation?

I look forward to your help and thanks in advance!


----------



## SirDice (Jul 20, 2011)

Contact the authors of said software. Even though they may have used (parts of) the source code of FreeBSD we have no idea how the software works or what changes they've made.


----------



## yousif (Jul 20, 2011)

*static arp in tcp/ip stack*

Hello,


I work with OMNeT and an extra module called oppBSD. In this module the freebsd tcp/ip stack has been implemented.

I have a question regarding the static arp enries. I want to set the the mac and ip address of the destination directly without sending an arp query first.

I tried to insert the mac and ip address of the destination directly into the initialize procedure of cHost.c in "BSDHost: initialize2()" leading to their insertion into route.câ€™s procedure "int rtrequest1 (int req, struct rt_addrinfo * info, struct rtentryret_nrt **)"  where they are being used in â€œrt_setgate (rt, dst, gateway)â€. There I got an error message from the function free(rt_key): â€œoppbsdProject/oppbsd/examples/udp_TwoSubnets/udp_TwoSubnets: free(): invalid next size (fast): 0x090711f8 ***â€. Could you please tell me why this is happening? 

Furthermore I have found no documentaion for the freebsd tcp/ip stack in the web. Do you know some location where the source code is detailed described?

If you have any questions I will be glad to answer them.

Many thanks in advance!


----------



## SirDice (Jul 20, 2011)

Please don't double post.

Thread 25163


----------



## DutchDaemon (Jul 20, 2011)

Indeed. Merged.


----------

