Networking Forums

Networking Forums > Computer Networking > Linux Networking > how many packet types can travel on Ethernet network?

Reply
Thread Tools Display Modes

how many packet types can travel on Ethernet network?

 
 
linux.lover
Guest
Posts: n/a

 
      01-23-2005, 03:14 AM
Hello all,
I have added some debug statements in linux kernel 2.4.24 in
/usr/src/linux/net/core/dev.c
printk(KERN_DEBUG "in netif_receive_skb after skb->len = %d and
address = %p\n",skb->len,skb->data);
printk(KERN_DEBUG "In netif_receive_skb skb->nh.iph->ihl = %d &&
skb->nh.iph->version = %d\n",skb->nh.iph->ihl,skb->nh.iph->version);
printk(KERN_DEBUG "packet type is =%d\n",type);
where all these 3 statemets are placed in netif_receive_skb function
of dev.c and type is defined as
unsigned short type = skb->protocol;
Then i rebuild kernel and check it on network and found following
results.

in netif_receive_skb after skb->len = 186 and address = c75ec620
In netif_receive_skb skb->nh.iph->ihl = 0 && skb->nh.iph->version = 14
packet type is =1024

in netif_receive_skb after skb->len = 46 and address = c74633a0
In netif_receive_skb skb->nh.iph->ihl = 0 && skb->nh.iph->version = 0
packet type is =1544

in netif_receive_skb after skb->len = 84 and address = c7463aa0
In netif_receive_skb skb->nh.iph->ihl = 0 && skb->nh.iph->version = 14
packet type is =1024

in netif_receive_skb after skb->len = 100 and address = c74639a0
In netif_receive_skb skb->nh.iph->ihl = 0 && skb->nh.iph->version = 14
packet type is =1024

in netif_receive_skb after skb->len = 78 and address = c7463aa0
In netif_receive_skb skb->nh.iph->ihl = 5 && skb->nh.iph->version = 4
packet type is =8

I want to know which are these packet types?
I know only values 8 for IP and 2054 for ARP packets then which are
these packets 1024,1544.
regards,
linux_lover
 
Reply With Quote
 
 
 
 
Juha Laiho
Guest
Posts: n/a

 
      01-23-2005, 03:05 PM
(E-Mail Removed) (linux.lover) said:
>I have added some debug statements in linux kernel 2.4.24 in
>/usr/src/linux/net/core/dev.c

(to dump e.g. packet types)

>I want to know which are these packet types?
>I know only values 8 for IP and 2054 for ARP packets then which are
>these packets 1024,1544.


Google, with keywords ethernet packet types iana
gives a good link to a page at www.iana.org (Internet Assigned Numbers
Authority).

Note though that what you refer to as '8' is actually '0800' (in
hexadecimal). So, don't get confused with different number bases.
--
Wolf a.k.a. Juha Laiho Espoo, Finland
(GC 3.0) GIT d- s+: a C++ ULSH++++$ P++@ L+++ E- W+$@ N++ !K w !O !M V
PS(+) PE Y+ PGP(+) t- 5 !X R !tv b+ !DI D G e+ h---- r+++ y++++
"...cancel my subscription to the resurrection!" (Jim Morrison)
 
Reply With Quote
 
Moe Trin
Guest
Posts: n/a

 
      01-23-2005, 10:33 PM
In article <(E-Mail Removed)> , linux.lover wrote:

In answer to your _subject_ line - 65536 ('type' is a 16 bit field in both
RFC894 and the little used RFC1042). However, not all types are assigned.
See http://www.iana.org/assignments/ethernet-numbers

>I have added some debug statements in linux kernel 2.4.24 in
>/usr/src/linux/net/core/dev.c


I don't have the source installed, but something appears to be drastically
wrong with your output. Either you have a transcription error when posting,
or your offsets to the data are wrong.

>I want to know which are these packet types?


I'd suggest running tcpdump along side your code until you are sure you
are grabbing the right bits out of the headers.

>I know only values 8 for IP and 2054 for ARP packets then which are
>these packets 1024,1544.


That makes no sense at all. There is no ethernet type 8. The '2054' would
be a decimal value to the 'type 0x0806' which is an ARP packet. There is
no type 1024 or 1544 in either decimal or hex. IP datagrams (actually IPv4)
have type 0x0800 or 2048 decimal.

Old guy

 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How build ip packet with my own ethernet header step Linux Networking 0 12-04-2007 05:47 AM
linux kernel 2.6 packet travel Giacomo Linux Networking 1 07-01-2005 03:47 PM
Can I send out an ethernet packet with over 1500 bytes in linux ? Hans Yin Linux Networking 4 12-21-2004 07:19 AM
packet loss ratio of ethernet ronghuazhang@gmail.com Windows Networking 1 11-23-2004 05:01 AM
Ethernet cables, several types? Mickybadia Home Networking 6 01-15-2004 03:27 PM



1 2 3 4 5 6 7 8 9 10 11