-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10 from kondukto-io/feature/add-dns-support
Feature/add dns support
- Loading branch information
Showing
12 changed files
with
135,765 additions
and
342 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#include "vmlinux.h" | ||
|
||
#define MAX_DNS_NAME_LENGTH 256 | ||
|
||
struct dns_hdr | ||
{ | ||
uint16_t transaction_id; | ||
uint8_t rd : 1; //Recursion desired | ||
uint8_t tc : 1; //Truncated | ||
uint8_t aa : 1; //Authoritive answer | ||
uint8_t opcode : 4; //Opcode | ||
uint8_t qr : 1; //Query/response flag | ||
uint8_t rcode : 4; //Response code | ||
uint8_t cd : 1; //Checking disabled | ||
uint8_t ad : 1; //Authenticated data | ||
uint8_t z : 1; //Z reserved bit | ||
uint8_t ra : 1; //Recursion available | ||
uint16_t q_count; //Number of questions | ||
uint16_t ans_count; //Number of answer RRs | ||
uint16_t auth_count; //Number of authority RRs | ||
uint16_t add_count; //Number of resource RRs | ||
}; | ||
|
||
//Used as a generic DNS response | ||
struct dns_response { | ||
uint16_t query_pointer; | ||
uint16_t record_type; | ||
uint16_t class; | ||
uint32_t ttl; | ||
uint16_t data_length; | ||
} __attribute__((packed)); | ||
|
||
struct dns_query { | ||
uint16_t record_type; | ||
uint16_t class; | ||
char name[MAX_DNS_NAME_LENGTH]; | ||
}; |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.