Patent ID: 7969996

Claim:
A tunneling apparatus that establishes a tunnel to a second tunneling apparatus, the tunneling apparatus comprising: a tunneling unit, which includes an encapsulation unit to encapsulate a frame into a packet and a decapsulation unit to decapsulate an encapsulated packet; a kernel unit that processes a packet; and a sorting unit connected to a network of the tunneling apparatus that allocates a packet received by the tunneling apparatus to at least one of the encapsulation unit, the decapsulation unit, and the kernel unit, wherein said sorting unit receives a packet from a network, and allocates the received packet to said decapsulation unit when a destination physical address of the packet is a physical address of the tunneling apparatus, a source logical address of the packet is a logical address of the second tunneling apparatus, and the packet has been encapsulated using an encapsulation method used by said encapsulation unit; allocates the received packet to said kernel unit when the destination physical address of the packet is the physical address of the tunneling apparatus and the source logical address of the packet is not the logical address of the second tunneling apparatus and the packet has not been encapsulated using an encapsulation method used by the encapsulation unit; allocates the received packet to said encapsulation unit when the destination physical address of the packet is not the physical address of the tunneling apparatus; and allocates the received packet to said kernel unit and said encapsulation unit when said destination physical address of the packet is a broadcast address; outputs a packet received from said kernel unit to at least one of said network and said encapsulation unit; if the destination physical address of a packet received form said decapsulation unit is a broadcast address, outputs said packet to said network and said kernel unit; if the destination physical address of said packet is said physical address of the tunneling apparatus, outputs said packet to said kernel unit; and if the destination physical address of said packet is any address other than said physical address of the tunneling apparatus, outputs said packet to said network; and outputs to said network a packet received from said encapsulation unit.