Clean Debug messages
This commit is contained in:
parent
1edb7287ff
commit
3ec6213b17
8 changed files with 46 additions and 80 deletions
|
@ -29,9 +29,7 @@ int send_card_buffer (struct grub_net_buff *pack)
|
|||
{
|
||||
|
||||
int actual;
|
||||
//grub_printf("packet size transmited: %d\n",pack->tail - pack->data);
|
||||
grub_ieee1275_write (handle,pack->data,pack->tail - pack->data,&actual);
|
||||
// grub_printf("actual transmited %d\n",actual);
|
||||
|
||||
return actual;
|
||||
}
|
||||
|
@ -50,18 +48,11 @@ int get_card_packet (struct grub_net_buff *pack __attribute__ ((unused)))
|
|||
do
|
||||
{
|
||||
grub_ieee1275_read (handle,datap,sizeof (*eth),&actual);
|
||||
// if (actual <= 0)
|
||||
// grub_millisleep(10);
|
||||
|
||||
}while (actual <= 0);
|
||||
eth = (struct etherhdr *) datap;
|
||||
datap += sizeof(*eth);
|
||||
|
||||
// grub_printf("ethernet eth->dst %x:%x:%x:%x:%x:%x\n",eth->dst[0],
|
||||
// eth->dst[1],eth->dst[2],eth->dst[3],eth->dst[4],eth->dst[5]);
|
||||
// grub_printf("ethernet eth->src %x:%x:%x:%x:%x:%x\n",eth->src[0],eth->src[1],
|
||||
// eth->src[2],eth->src[3],eth->src[4],eth->src[5]);
|
||||
// grub_printf ("eth.type 0x%x\n",eth->type);
|
||||
|
||||
switch (eth->type)
|
||||
{
|
||||
|
@ -77,10 +68,6 @@ int get_card_packet (struct grub_net_buff *pack __attribute__ ((unused)))
|
|||
iph = (struct iphdr *) datap;
|
||||
datap += sizeof(*iph);
|
||||
|
||||
// grub_printf("ip.src 0x%x\n",iph->src);
|
||||
// grub_printf("ip.dst 0x%x\n",iph->dest);
|
||||
// grub_printf("ip.len 0x%x\n",iph->len);
|
||||
// grub_printf("ip.protocol 0x%x\n",iph->protocol);
|
||||
|
||||
grub_ieee1275_read (handle,datap,iph->len - sizeof (*iph),&actual);
|
||||
|
||||
|
@ -89,11 +76,8 @@ int get_card_packet (struct grub_net_buff *pack __attribute__ ((unused)))
|
|||
break;
|
||||
|
||||
case 0x86DD:
|
||||
grub_printf("!!!!!!!!!!!!!!!!!IPV6 packet received!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n");
|
||||
grub_ieee1275_read (handle,datap,sizeof (*ip6h),&actual);
|
||||
ip6h = (struct ip6hdr *) datap;
|
||||
grub_printf("ip6hdr->payload_len = %x\n",ip6h->payload_len);
|
||||
grub_printf("ip6hdr->nexthdr = %x\n",ip6h->nexthdr);
|
||||
|
||||
datap += sizeof(*ip6h);
|
||||
grub_ieee1275_read (handle,datap,ip6h->payload_len - sizeof (*ip6h),&actual);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue