mardi 30 juin 2015

Hadoop-PCap-Lib Field Types

I'm trying to make a protobuf class that can more efficiently stream DNSPackets that have been captured using TCPDump.

I would like to know the types of all of the possible fields offered in this library:

DNSPacket Fields:
    QUERYID
    QR
    OPCODE
    RCODE
    QUESTION
    QNAME
    QTYPE
    ANSWER
    AUTHORITY
    ADDITIONAL
Packet Fields:
    TIMESTAMP
    TIMESTAMP_USEC
    TIMESTAMP_MICROS
    TTL
    IP_VERSION
    IP_HEADER_LENGTH
    IP_FLAGS_DF
    IP_FLAGS_MF
    IPV6_FLAGS_M
    FRAGMENT_OFFSET
    FRAGMENT
    LAST_FRAGMENT
    PROTOCOL
    SRC
    DST
    ID
    SRC_PORT
    DST_PORT
    TCP_HEADER_LENGTH
    TCP_SEQ
    TCP_ACK
    LEN
    UDPSUM
    UDP_LENGTH
    TCP_FLAG_NS
    TCP_FLAG_CWR
    TCP_FLAG_ECE
    TCP_FLAG_URG
    TCP_FLAG_ACK
    TCP_FLAG_PSH
    TCP_FLAG_RST
    TCP_FLAG_SYN
    TCP_FLAG_FIN
    /*Not sure bout these two*/
    REASSEMBLED_TCP_FRAGMENTS 
    REASSEMBLED_DATAGRAM_FRAGMENTS

My application is in Scala and I tried simple reflection on a few of the packets I captured, but many fields are null, which isn't helpful.

The library can be found on GitHub here

Is there a simple way I can get the types of ALL of these fields? (Either programmatically or via a text source)

Thanks, RDS





Aucun commentaire:

Enregistrer un commentaire