Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
ISC Open Source Projects
BIND
Commits
5126112b
Commit
5126112b
authored
Sep 11, 2000
by
Mark Andrews
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
438. [func] New function dns_message_getrawmessage().
parent
66827886
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
16 deletions
+26
-16
CHANGES
CHANGES
+2
-0
lib/dns/include/dns/message.h
lib/dns/include/dns/message.h
+5
-1
lib/dns/message.c
lib/dns/message.c
+19
-15
No files found.
CHANGES
View file @
5126112b
438. [func] New function dns_message_getrawmessage().
437. [func] Log NOTIFY activity to the notify channel.
436. [bug] If recvmsg() returned EHOSTUNREACH or ENETUNREACH,
...
...
lib/dns/include/dns/message.h
View file @
5126112b
...
...
@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: message.h,v 1.7
5
2000/0
8/01 01:24:21 tale
Exp $ */
/* $Id: message.h,v 1.7
6
2000/0
9/11 05:55:27 marka
Exp $ */
#ifndef DNS_MESSAGE_H
#define DNS_MESSAGE_H 1
...
...
@@ -211,6 +211,7 @@ struct dns_message {
dns_rcode_t
sig0status
;
isc_region_t
*
query
;
isc_region_t
*
saved
;
isc_buffer_t
*
rawmessge
;
};
/***
...
...
@@ -1154,6 +1155,9 @@ dns_message_checksig(dns_message_t *msg, dns_view_t *view);
* DNS_R_TSIGVERIFYFAILURE - The TSIG failed to verify
*/
isc_region_t
*
dns_message_getrawmessage
(
dns_message_t
*
msg
);
ISC_LANG_ENDDECLS
#endif
/* DNS_MESSAGE_H */
lib/dns/message.c
View file @
5126112b
...
...
@@ -15,7 +15,7 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: message.c,v 1.14
4
2000/09/
09 10:46:58 bwelling
Exp $ */
/* $Id: message.c,v 1.14
5
2000/09/
11 05:55:23 marka
Exp $ */
/***
*** Imports
...
...
@@ -1488,21 +1488,19 @@ dns_message_parse(dns_message_t *msg, isc_buffer_t *source,
}
}
if
(
msg
->
tsig
!=
NULL
||
msg
->
tsigkey
!=
NULL
||
msg
->
sig0
!=
NULL
)
{
msg
->
saved
=
isc_mem_get
(
msg
->
mctx
,
sizeof
(
isc_region_t
));
if
(
msg
->
saved
==
NULL
)
return
(
ISC_R_NOMEMORY
);
isc_buffer_usedregion
(
&
origsource
,
&
r
);
msg
->
saved
->
length
=
r
.
length
;
msg
->
saved
->
base
=
isc_mem_get
(
msg
->
mctx
,
msg
->
saved
->
length
);
if
(
msg
->
saved
->
base
==
NULL
)
{
isc_mem_put
(
msg
->
mctx
,
msg
->
saved
,
sizeof
(
isc_region_t
));
msg
->
saved
=
NULL
;
return
(
ISC_R_NOMEMORY
);
}
memcpy
(
msg
->
saved
->
base
,
r
.
base
,
msg
->
saved
->
length
);
msg
->
saved
=
isc_mem_get
(
msg
->
mctx
,
sizeof
(
isc_region_t
));
if
(
msg
->
saved
==
NULL
)
return
(
ISC_R_NOMEMORY
);
isc_buffer_usedregion
(
&
origsource
,
&
r
);
msg
->
saved
->
length
=
r
.
length
;
msg
->
saved
->
base
=
isc_mem_get
(
msg
->
mctx
,
msg
->
saved
->
length
);
if
(
msg
->
saved
->
base
==
NULL
)
{
isc_mem_put
(
msg
->
mctx
,
msg
->
saved
,
sizeof
(
isc_region_t
));
msg
->
saved
=
NULL
;
return
(
ISC_R_NOMEMORY
);
}
memcpy
(
msg
->
saved
->
base
,
r
.
base
,
msg
->
saved
->
length
);
return
(
ISC_R_SUCCESS
);
}
...
...
@@ -2894,3 +2892,9 @@ dns_message_totext(dns_message_t *msg, dns_messagetextflag_t flags,
return
(
ISC_R_SUCCESS
);
}
isc_region_t
*
dns_message_getrawmessage
(
dns_message_t
*
msg
)
{
REQUIRE
(
DNS_MESSAGE_VALID
(
msg
));
return
(
msg
->
saved
);
}
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