Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ISC Open Source Projects
BIND
Commits
ded7456a
Commit
ded7456a
authored
Apr 30, 1999
by
Michael Graff
Browse files
Implement searching for a name in a section.
parent
4756105b
Changes
2
Hide whitespace changes
Inline
Side-by-side
lib/dns/include/dns/message.h
View file @
ded7456a
...
...
@@ -145,8 +145,8 @@ dns_message_create(isc_mem_t *mctx, dns_message_t **msg, unsigned int intent);
* structure.
*
* Returns:
* DNS_R_NOMEMORY - out of memory
* DNS_R_SUCCESS - success
* DNS_R_NOMEMORY -
-
out of memory
* DNS_R_SUCCESS -
-
success
*/
void
...
...
@@ -245,9 +245,8 @@ dns_message_renderchangebuffer(dns_message_t *msg, isc_buffer_t *buffer);
*
* Returns:
*
* DNS_R_NOSPACE - new buffer is too small
*
* DNS_R_SUCCESS - all is well.
* DNS_R_NOSPACE -- new buffer is too small
* DNS_R_SUCCESS -- all is well.
*/
dns_result_t
...
...
lib/dns/message.c
View file @
ded7456a
...
...
@@ -1155,6 +1155,8 @@ dns_message_findname(dns_message_t *msg, dns_section_t section,
dns_name_t
*
target
,
dns_rdatatype_t
type
,
dns_name_t
**
name
,
dns_rdataset_t
**
rdataset
)
{
dns_name_t
*
foundname
;
dns_result_t
result
;
/*
* XXX These requirements are probably too intensive, especially
...
...
@@ -1174,8 +1176,24 @@ dns_message_findname(dns_message_t *msg, dns_section_t section,
REQUIRE
(
*
rdataset
==
NULL
);
}
return
(
ISC_R_NOTIMPLEMENTED
);
/* XXX implement */
/*
* Search through, looking for the name.
*/
result
=
findname
(
&
foundname
,
target
,
&
msg
->
sections
[
section
]);
if
(
result
!=
DNS_R_SUCCESS
)
return
(
result
);
if
(
name
!=
NULL
)
*
name
=
foundname
;
/*
* And now look for the type.
*/
if
(
rdataset
==
NULL
)
return
(
DNS_R_SUCCESS
);
result
=
findtype
(
rdataset
,
foundname
,
type
);
return
(
result
);
}
void
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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