g++ packet.cpp radix.cpp route.cpp -o route
There is no problem in the compilation of the code but when I try to run
it...
Segmentation fault (core dumped)
I've located where the problem is... It is part of the following function's
code:
int rtrequest(int req, class Sockaddr *Dst, class Sockaddr *Gateway, class
Sockaddr *Netmask, int flags, class rtentry **ret_nrt)
{
register class rtentry *rt;
register class radix_node *rn;
register class radix_node_head *rnh;
struct ifaddr *ifa;
class Sockaddr *Ndst;
....
rt->rt_ifp = (struct ifnet *) ifa->ifa_ifp;
....}
rt_ifp is of type struct ifnet *
I don't what to do to overcome the problem.
Any help is welcomed.
Thanks in advance
Alexander Bartzas