28 Oct 2003 17:46
IOCTL problem!!!
Paula Berger <pberger <at> inf.ufrgs.br>
2003-10-28 16:46:37 GMT
2003-10-28 16:46:37 GMT
Hi everybody.. I'm new here, so let's see if you guys can help me(Continue reading)I'm trying to use the ioctl function with the SIOCADDRT flag and I'm having some problems! What i want to do is simply add the default gateway to my routing table. I'm using the struct rtentry (don't know if I'm using it correctly though) then I create a datagram socket and the I use the ioctl function... Does anyone know what's wrong? I'm sending my source as an example... if someone could please help me, I REALLY nedd to do this!!! Thanks, -- Paula Berger E-mail: pberger <at> inf.ufrgs.br -- EXAMPLE: int main() { uint32_t IpAddr; uint32_t Dst; uint32_t GenMask; struct sockaddr_in Route; struct rtentry Entry; int SockFd, res = 0; memset ((char *)&Entry, 0, sizeof (struct rtentry)); Entry.rt_gateway.sa_family = AF_INET;
I'm trying to use the ioctl function with the SIOCADDRT flag and I'm having
some problems! What i want to do is simply add the default gateway to my
routing table. I'm using the struct rtentry (don't know if I'm using it
correctly though) then I create a datagram socket and the I use the ioctl
function... Does anyone know what's wrong?
I'm sending my source as an example... if someone could please help me, I
REALLY nedd to do this!!!
Thanks,
--
Paula Berger
E-mail: pberger <at> inf.ufrgs.br
--
EXAMPLE:
int main() {
uint32_t IpAddr;
uint32_t Dst;
uint32_t GenMask;
struct sockaddr_in Route;
struct rtentry Entry;
int SockFd, res = 0;
memset ((char *)&Entry, 0, sizeof (struct rtentry));
Entry.rt_gateway.sa_family = AF_INET;
RSS Feed