Since i suspect that the v4 interface is silently dropping my packets, i did a
dtrace on sol10 and found this:
1 43020 bge_send:entry :
Sent Packet
Ethernet Header
Destination: 0:d:ed:8a:a8:0
Source: 0:3:ba:c0:8e:95
Type: 800
1 43020 bge_send:entry IP Header
version and header length = 45
TOS = 0
length = bf3
ident = e7d2
fragment offset = 800
IP flags = 0
ttl = 3c
protocol = 6
header checksum = 89b5
Source IP Addr = 106.212.77.10
Destination IP Addr = 195.201.77.10
1 43021 bge_send:return
0 43020 bge_send:entry :
Sent Packet
Ethernet Header
Destination: 0:d:ed:8a:a8:0
Source: 0:3:ba:c0:8e:95
Type: 86dd
0 43021 bge_send:return
dtrace script that i used is below:
#include <sys/types.h>
#include <sys/ethernet.h>
bge_send:entry
{
self->mp = (mblk_t *)args[1];
self->ether = (struct ether_header*)self->mp->b_rptr;
self->daddr = self->ether->ether_dhost;
self->saddr = self->ether->ether_shost;
self->dest = self->daddr;
self->src = self->saddr;
self->type = (self->ether->ether_type & 0xf0)|(self->ether->ether_type
& 0xf);
printf(":\n");
printf("Sent Packet\n");
printf("Ethernet Header\n");
printf(" Destination: ");
printf("%x:", (char)self->dest.ether_addr_octet[0]);
printf("%x:", (char)self->dest.ether_addr_octet[1]);
printf("%x:", (char)self->dest.ether_addr_octet[2]);
printf("%x:", (char)self->dest.ether_addr_octet[3]);
printf("%x:", (char)self->dest.ether_addr_octet[4]);
printf("%x", (char)self->dest.ether_addr_octet[5]);
printf("\n Source: ");
printf("%x:", (char)self->src.ether_addr_octet[0]);
printf("%x:", (char)self->src.ether_addr_octet[1]);
printf("%x:", (char)self->src.ether_addr_octet[2]);
printf("%x:", (char)self->src.ether_addr_octet[3]);
printf("%x:", (char)self->src.ether_addr_octet[4]);
printf("%x", (char)self->src.ether_addr_octet[5]);
printf("\n Type: ");
printf("%x\n", (self->ether->ether_type));
}
bge_send:entry
/self->type == 0xd/
{
self->iphdr = (ipha_t *)((char *)self->mp->b_rptr+sizeof(struct
ether_header));
printf("IP Header\n");
printf(" version and header length = %x\n",
self->iphdr->ipha_version_and_hdr_length);
printf(" TOS = %x\n", self->iphdr->ipha_type_of_service);
printf(" length = %x%x\n", (self->iphdr->ipha_length&0xff),
((self->iphdr->ipha_length&0xff00)>>8));
printf(" ident = %x%x\n", (self->iphdr->ipha_ident&0xff),
((self->iphdr->ipha_ident&0xff00)>>8));
printf(" fragment offset = %x\n",
((self->iphdr->ipha_fragment_offset_and_flags&0xfff1)>>3));
printf(" IP flags = %x\n",
(self->iphdr->ipha_fragment_offset_and_flags&0x7));
printf(" ttl = %x\n", self->iphdr->ipha_ttl);
printf(" protocol = %x\n", (char)self->iphdr->ipha_protocol);
self->protocol = self->iphdr->ipha_protocol;
printf(" header checksum = %x%x\n",
(self->iphdr->ipha_hdr_checksum&0xff),
((self->iphdr->ipha_hdr_checksum&0xff00)>>8));
printf(" Source IP Addr = %d", (self->iphdr->ipha_src&0xff));
printf(".%d", ((self->iphdr->ipha_src&0xff00)>>8));
printf(".%d", ((self->iphdr->ipha_src&0xff0000)>>16));
printf(".%d\n", ((self->iphdr->ipha_src&0xff000000)>>24));
printf(" Destination IP Addr = %d", (self->iphdr->ipha_dst&0xff));
printf(".%d", ((self->iphdr->ipha_dst&0xff00)>>8));
printf(".%d", ((self->iphdr->ipha_dst&0xff0000)>>16));
printf(".%d\n", ((self->iphdr->ipha_dst&0xff000000)>>24));
}
bge_send:entry
/self->type == 0x0/
{
self->iphdr = (ipha_t *)((char *)self->mp->b_rptr+sizeof(struct
ether_header));
printf("IP Header\n");
printf(" version and header length = %x\n",
self->iphdr->ipha_version_and_hdr_length);
printf(" TOS = %x\n", self->iphdr->ipha_type_of_service);
printf(" length = %x%x\n", (self->iphdr->ipha_length&0xff),
((self->iphdr->ipha_length&0xff00)>>8));
printf(" ident = %x%x\n", (self->iphdr->ipha_ident&0xff),
((self->iphdr->ipha_ident&0xff00)>>8));
printf(" fragment offset = %x\n",
((self->iphdr->ipha_fragment_offset_and_flags&0xfff1)>>3));
printf(" IP flags = %x\n",
(self->iphdr->ipha_fragment_offset_and_flags&0x7));
printf(" ttl = %x\n", self->iphdr->ipha_ttl);
printf(" protocol = %x\n", (char)self->iphdr->ipha_protocol);
self->protocol = self->iphdr->ipha_protocol;
printf(" header checksum = %x%x\n", (self->iphdr->ipha_hdr_checksum&0xf
f), ((self->iphdr->ipha_hdr_checksum&0xff00)>>8));
printf(" Source IP Addr = %d", (self->iphdr->ipha_src&0xff));
printf(".%d", ((self->iphdr->ipha_src&0xff00)>>8));
printf(".%d", ((self->iphdr->ipha_src&0xff0000)>>16));
printf(".%d\n", ((self->iphdr->ipha_src&0xff000000)>>24));
printf(" Destination IP Addr = %d", (self->iphdr->ipha_dst&0xff));
printf(".%d", ((self->iphdr->ipha_dst&0xff00)>>8));
printf(".%d", ((self->iphdr->ipha_dst&0xff0000)>>16));
printf(".%d\n", ((self->iphdr->ipha_dst&0xff000000)>>24));
}
bge_send_copy:entry,
bge_send_copy:return
{
}
bge_send:return
{
}
If you analyze the dtrace output, i could see that the IPHeader is printed for
v4 packets, and it's not printed for v6 packets [ check ether type 86dd ]. Does
this mean that this packet is silently droppped by the interface during
bge_send ? Please clarify!
Thanks
This message posted from opensolaris.org
_______________________________________________
networking-discuss mailing list
[email protected]