[prev in list] [next in list] [prev in thread] [next in thread]
List: libnet
Subject: IPv6 & Libnet
From: Julio Baixauli <baixauli () MAT ! UPC ! ES>
Date: 2000-09-19 13:14:27
[Download RAW message or body]
Hello!
I'm trying to write IPv6 packets but I have a problem. I receive a
"network unreachable" when I try to send a packet to ::ffff:0:9353:27d8
(in my local IPv6 network), but I can make a ping to this address. What
could be the error?
I use a custom write_ip6 function:
___________________________________________________________________
int my_libnet_write_ip6(int sock, u_char *buf, int len)
{
int c;
struct sockaddr_in6 sin;
struct my_ip6_hdr *ip_hdr;
ip_hdr = (struct my_ip6_hdr *)buf;
// if LIBNET_BSD_BYTE_SWAP ???
memset(&sin, 0, sizeof(struct sockaddr_in6));
sin.sin6_family = AF_INET6;
memcpy( &sin.sin6_addr, &ip_hdr->ip6_src, sizeof(struct in6_addr));
c = sendto(sock, buf, len, 0, (struct sockaddr *)&sin, sizeof(sin));
// if LIBNET_BSD_BYTE_SWAP ???
return (c);
}
_____________________________________________________________________
It's similar to the libnet_write_ip() function. I'm not sure if I have
to swap byte order (if LIBNET_BSD_BYTE_SWAP ???), I'm using Linux Red
Hat.
Any ideas on this IPv6 problem?
Thank you very much!
--
********************************************
Julio Baixauli Garreta
baixauli@mat.upc.es
********************************************
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic