src/org/jnetpcap/packet/JRegistry.java
static int register(JProtocol protocol) {

		Entry e = new Entry(protocol.getId(), protocol.getHeaderClassName());
		mapByClassName.put(protocol.getHeaderClassName(), e);
		MAP_BY_ID[protocol.getId()] = e;

		try {
			scanners[protocol.getId()] = new JHeaderScanner(protocol);
		} catch (UnregisteredHeaderException ex) {
			register(protocol.getClazz(), errors);
		}

		for (PcapDLT d : protocol.getDlt()) {
			registerDLT(d, protocol.getId());
		}

		return protocol.getId();
	}
/**
	 * Registeres the core protocols. Not user accessible as this is done by
	 * default for all core protocols.
	 * 
	 * @param protocol
	 *          core protocol
	 * @return id of the core protocol, should be the same as ID pre-assigned in
	 *         JProtocol table
	 */
Registeres the core protocols. Not user accessible as this is done by
default for all core protocols.

@param protocol
core protocol
@return id of the core protocol, should be the same as ID pre-assigned in
JProtocol table
Registeres the core protocols . Not user accessible as this is done by default for all core protocols . @param protocol core protocol @return id of the core protocol should be the same as ID pre - assigned in JProtocol table
static int register(JProtocol protocol) {
		Entry e = new Entry(protocol.getId(), protocol.getHeaderClassName());
		mapByClassName.put(protocol.getHeaderClassName(), e);
		MAP_BY_ID[protocol.getId()] = e;
		try {
			scanners[protocol.getId()] = new JHeaderScanner(protocol);
		} catch (UnregisteredHeaderException ex) {
			register(protocol.getClazz(), errors);
		}
		for (PcapDLT d : protocol.getDlt()) {
			registerDLT(d, protocol.getId());
		}
		return protocol.getId();
	}
static int register ( JProtocol protocol ) { Entry e = new Entry ( protocol . getId ( ) , protocol . getHeaderClassName ( ) ) ; mapByClassName . put ( protocol . getHeaderClassName ( ) , e ) ; MAP_BY_ID [ protocol . getId ( ) ] = e ; try { scanners [ protocol . getId ( ) ] = new JHeaderScanner ( protocol ) ; } catch ( UnregisteredHeaderException ex ) { register ( protocol . getClazz ( ) , errors ) ; } for ( PcapDLT d : protocol . getDlt ( ) ) { registerDLT ( d , protocol . getId ( ) ) ; } return protocol . getId ( ) ; }
Registeres the core protocols.
Registeres the core protocols .