public static byte getProtocolTypeFromString(String str) {
        switch (str.toLowerCase()) {
            case PROTOCOL_NAME_TCP:
                return IPv4.PROTOCOL_TCP;
            case PROTOCOL_NAME_UDP:
                return IPv4.PROTOCOL_UDP;
            case PROTOCOL_NAME_ANY:
            default:
                return ARBITRARY_PROTOCOL;
        }
    }
@Test
    public void testGetProtocolTypeFromString() {
        assertEquals(IPv4.PROTOCOL_TCP, getProtocolTypeFromString(PROTOCOL_TCP_L));
        assertEquals(IPv4.PROTOCOL_TCP, getProtocolTypeFromString(PROTOCOL_TCP_S));

        assertEquals(IPv4.PROTOCOL_UDP, getProtocolTypeFromString(PROTOCOL_UDP_L));
        assertEquals(IPv4.PROTOCOL_UDP, getProtocolTypeFromString(PROTOCOL_UDP_S));

        assertEquals(0, getProtocolTypeFromString(PROTOCOL_ANY_L));
        assertEquals(0, getProtocolTypeFromString(PROTOCOL_ANY_S));
    }