public synchronized void process(SocketBuffer skbuf) {
try {
final int protoID = skbuf.getProtocolID();
final Device dev = skbuf.getDevice();
if (dev == null) {
throw new NetworkException("Device not set on SocketBuffer");
}
final NetDeviceAPI deviceAPI;
try {
deviceAPI = dev.getAPI(NetDeviceAPI.class);
} catch (ApiNotFoundException ex) {
throw new NetworkException("Device in SocketBuffer is not a network device");
}
// Find all the packettype that want to process the given packet
try {
final NetworkLayer pt = getNetworkLayer(protoID);