[Click] Packet Handling

Paolo Mailing paolo.mailing at gmail.com
Sat Jul 15 14:59:45 EDT 2006


Hi to all,
I would like to fragment a packet on a link and reassemble it on the
other side of the link.
It's an Ethernet encapsulated packet.
The buffer of the packet is like this : Headroom - Data - Tailroom .
In the Data field there is the ethernet header, the ip header and the
data payload.
I would like to take all that fields and put them in a buffer, then
divide this buffer in other
two buffers and then create other two packets and put the buffers in
this two packet the Data
field with a special ethernet header with a cstomized ethertype.
And then I would like to reassemble the packet from this two fragment.
Can anyone help me?
Thanks Paolo



This is a graphic scheme :

+------------------------------+
|                                |
|   HEADROOM          |
|                                |
+------------------------------+
|                                |
|   -------------------------    |
|                                |
|   EthernetHeader       |
|                                |
|   -------------------------    |
|                                |
|    IPHeader               |  DATA
|                                |
|   -------------------------    |
|                                |
|  DATAPAYLOAD      |
|                                |
|   -------------------------    |
|                                |
+------------------------------+
|                                |
|   TAILROOM            |
|                                |
+------------------------------+



+------------------------------+
|                                |
|   -------------------------    |
|                                |
|   EthernetHeader       |
|                                |
|   -------------------------    |
|                                |
|    IPHeader               |  DATA = Buffer1 + Buffer2
|                                |
|   -------------------------    |
|                                |
|  DATAPAYLOAD      |
|                                |
|   -------------------------    |
|                                |
+------------------------------+




PACKET1
+------------------------------+
|                                |
|   HEADROOM          |
|                                |
+------------------------------+
|                                |
|   -------------------------    |
|                                |
|   EthernetHeader       |
|                                |
|   -------------------------    |
|                                |
|    Buffer1                  |  DATA
|                                |
|   -------------------------    |
|                                |
+------------------------------+
|                                |
|   TAILROOM            |
|                                |
+------------------------------+


PACKET2
+------------------------------+
|                                |
|   HEADROOM          |
|                                |
+------------------------------+
|                                |
|   -------------------------    |
|                                |
|   EthernetHeader       |
|                                |
|   -------------------------    |
|                                |
|    Buffer2                  |  DATA
|                                |
|   -------------------------    |
|                                |
+------------------------------+
|                                |
|   TAILROOM            |
|                                |
+------------------------------+


More information about the click mailing list