Skip to content

HOMER 7.x (WIP)

Lorenzo Mangani edited this page Dec 2, 2017 · 4 revisions

HOMER 7

This wiki page tracks some of the current HOMER 7 definitions, components, formats and configuration elements. This is intended as a "work in progress" document reserved for Developers, and should not be referred to by users until official release (01-2018)

API

HOMER 7 ships with a NodeJS powered backend replacing the former homer-api component.

HEP

This sections lists the new HEP Types, IDs and Payload formats utilized in HOMER 7

Type 53: DNS

Struct

type DNS struct {
    ID     uint16           `json:"id"`
    QR     bool             `json:"qr"`
    OpCode layers.DNSOpCode `json:"opcode"`

    AA bool  `json:"aa"` // Authoritative answer
    TC bool  `json:"tc"` // Truncated
    RD bool  `json:"rd"` // Recursion desired
    RA bool  `json:"ra"` // Recursion available
    Z  uint8 `json:"z"`  // For future use

    ResponseCode layers.DNSResponseCode `json:"rescode"`
    QDCount      uint16                 `json:"qdc"` // Expected questions
    ANCount      uint16                 `json:"anc"` // Expected answers
    NSCount      uint16                 `json:"nsc"` // Expected authorities
    ARCount      uint16                 `json:"arc"` // Expected additional records

    Questions []DNSQuestion       `json:"questions,omitempty"`
    Answers   []DNSResourceRecord `json:"answers,omitempty"`
}

type DNSQuestion struct {
    Name  string          `json:"name"`
    Type  layers.DNSType  `json:"type"`
    Class layers.DNSClass `json:"class"`
}

type DNSResourceRecord struct {
    Name  string          `json:"name"`
    Type  layers.DNSType  `json:"type"`
    Class layers.DNSClass `json:"class"`
    TTL   uint32          `json:"ttl"`

    IP    net.IP `json:"ip,omitempty"`
    NS    string `json:"ns,omitempty"`
    CNAME string `json:"cname,omitempty"`
}

Output Sample

{"id":65082,"qr":false,"opcode":0,"aa":false,"tc":false,"rd":true,"ra":false,"z":0,"rescode":0,"qdc":1,"anc":0,"nsc":0,"arc":0,"questions":[{"name":"google.com","type":1,"class":1}]}
Clone this wiki locally