Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
BIND
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
632
Issues
632
List
Boards
Labels
Service Desk
Milestones
Merge Requests
104
Merge Requests
104
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ISC Open Source Projects
BIND
Commits
a6a0f270
Commit
a6a0f270
authored
Apr 08, 1999
by
Michael Graff
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msg.h -> message.h, and dns_msg* to dns_message*
parent
3c11c877
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
28 deletions
+30
-28
lib/dns/include/dns/message.h
lib/dns/include/dns/message.h
+30
-28
No files found.
lib/dns/include/dns/message.h
View file @
a6a0f270
...
...
@@ -15,8 +15,8 @@
* SOFTWARE.
*/
#ifndef DNS_M
SG
_H
#define DNS_M
SG
_H 1
#ifndef DNS_M
ESSAGE
_H
#define DNS_M
ESSAGE
_H 1
/***
*** Imports
...
...
@@ -33,7 +33,7 @@
/*
* How this beast works:
*
* When a dns message is received in a buffer, dns_m
sg
_fromwire() is called
* When a dns message is received in a buffer, dns_m
essage
_fromwire() is called
* on the memory region. Various items are checked including the format
* of the message (if counts are right, if counts consume the entire sections,
* and if sections consume the entire message) and known pseudo-RRs in the
...
...
@@ -42,10 +42,10 @@
* TSIG checking is also done at this layer, and any DNSSEC information should
* also be performed at this time.
*
* If dns_m
sg
_fromwire() returns DNS_R_MOREDATA additional
* If dns_m
essage
_fromwire() returns DNS_R_MOREDATA additional
* message packets are required. This implies an EDNS message.
*
* When going from structure to wire, dns_m
sg
_towire() will return
* When going from structure to wire, dns_m
essage
_towire() will return
* DNS_R_MOREDATA if there is more data left in the output buffer that
* could not be rendered into the exisiting buffer.
*
...
...
@@ -56,15 +56,15 @@
ISC_LANG_BEGINDECLS
#define DNS_M
SG
_QR 0x8000U
#define DNS_M
SG
_AA 0x0400U
#define DNS_M
SG
_TC 0x0200U
#define DNS_M
SG
_RD 0x0100U
#define DNS_M
SG
_RA 0x0080U
#define DNS_M
ESSAGE
_QR 0x8000U
#define DNS_M
ESSAGE
_AA 0x0400U
#define DNS_M
ESSAGE
_TC 0x0200U
#define DNS_M
ESSAGE
_RD 0x0100U
#define DNS_M
ESSAGE
_RA 0x0080U
#define DNS_M
SG
_OPCODE_MASK 0x7000U
#define DNS_M
SG_OPCODE_SHIFT
11
#define DNS_M
SG
_RCODE_MASK 0x000fU
#define DNS_M
ESSAGE
_OPCODE_MASK 0x7000U
#define DNS_M
ESSAGE_OPCODE_SHIFT
11
#define DNS_M
ESSAGE
_RCODE_MASK 0x000fU
typedef
struct
{
unsigned
int
magic
;
/* magic */
...
...
@@ -86,8 +86,8 @@ typedef struct {
unsigned
char
*
data
;
/* start of raw data */
unsigned
int
datalen
;
/* length of data */
ISC_LINK
(
dns_m
sgelem_t
)
link
;
/* next msg */
}
dns_m
sg
elem_t
;
ISC_LINK
(
dns_m
essageelem_t
)
link
;
/* next msg */
}
dns_m
essage
elem_t
;
/*
...
...
@@ -119,10 +119,10 @@ typedef struct {
dns_namelist_t
additional
;
unsigned
int
nmsgs
;
ISC_LIST
(
dns_m
sgelem_t
)
msgs
;
}
dns_m
sg
_t
;
ISC_LIST
(
dns_m
essageelem_t
)
msgs
;
}
dns_m
essage
_t
;
void
dns_m
sg_init
(
dns_msg
_t
*
msg
);
void
dns_m
essage_init
(
dns_message
_t
*
msg
);
/*
* initialize msg structure. Must be called on a new (or reused) structure.
*
...
...
@@ -131,7 +131,8 @@ void dns_msg_init(dns_msg_t *msg);
* structure.
*/
dns_result_t
dns_msg_associate
(
dns_msg_t
*
msg
,
void
*
buffer
,
size_t
buflen
);
dns_result_t
dns_message_associate
(
dns_message_t
*
msg
,
void
*
buffer
,
size_t
buflen
);
/*
* Associate a buffer with a message structure. This function will
* validate the buffer, allocate an internal message element to hold
...
...
@@ -161,7 +162,7 @@ dns_result_t dns_msg_associate(dns_msg_t *msg, void *buffer, size_t buflen);
* DNS_R_??? -- bad signature (XXX need more of these)
*/
dns_m
sgelem_t
*
dns_msgelem_first
(
dns_msg
_t
*
msg
);
dns_m
essageelem_t
*
dns_messageelem_first
(
dns_message
_t
*
msg
);
/*
* Return the first message element's pointer.
*
...
...
@@ -173,7 +174,8 @@ dns_msgelem_t *dns_msgelem_first(dns_msg_t *msg);
* are associated.
*/
dns_msgelem_t
*
dns_msgelem_next
(
dns_msg_t
*
msg
,
dns_msgelem_t
*
elem
);
dns_messageelem_t
*
dns_messageelem_next
(
dns_message_t
*
msg
,
dns_messageelem_t
*
elem
);
/*
* Return the next message element pointer.
*
...
...
@@ -187,25 +189,25 @@ dns_msgelem_t *dns_msgelem_next(dns_msg_t *msg, dns_msgelem_t *elem);
* exist.
*/
dns_name_t
*
dns_m
sg_firstname
(
dns_msg
_t
*
msg
,
dns_namelist_t
*
section
);
dns_name_t
*
dns_m
essage_firstname
(
dns_message
_t
*
msg
,
dns_namelist_t
*
section
);
/*
* Returns a pointer to the first name in the specified section.
*/
dns_name_t
*
dns_m
sg_nextname
(
dns_msg
_t
*
msg
,
dns_namelist_t
*
section
,
dns_name_t
*
name
);
dns_name_t
*
dns_m
essage_nextname
(
dns_message
_t
*
msg
,
dns_namelist_t
*
section
,
dns_name_t
*
name
);
/*
* Returns a pointer to the next name in the specified section.
*/
void
dns_m
sg_movename
(
dns_msg
_t
*
msg
,
dns_namelist_t
*
fromsection
,
dns_namelist_t
*
tosection
);
void
dns_m
essage_movename
(
dns_message
_t
*
msg
,
dns_namelist_t
*
fromsection
,
dns_namelist_t
*
tosection
);
/*
* Move a name from one section to another.
*/
dns_result_t
dns_m
sg_addname
(
dns_msg
_t
*
msg
,
dns_namelist_t
*
section
,
dns_name_t
*
name
);
dns_result_t
dns_m
essage_addname
(
dns_message
_t
*
msg
,
dns_namelist_t
*
section
,
dns_name_t
*
name
);
/*
* Adds the name to the given section.
*
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment