Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
TLMSP curl
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
CYBER - Cyber Security
TS 103 523 MSP
TLMSP
TLMSP curl
Commits
eb612bfd
Commit
eb612bfd
authored
16 years ago
by
Daniel Stenberg
Browse files
Options
Downloads
Patches
Plain Diff
Charles Hardin made adig support a regular numerical dotted IP address for the
-s option as well.
parent
5e826c78
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
ares/CHANGES
+4
-0
4 additions, 0 deletions
ares/CHANGES
ares/adig.c
+10
-5
10 additions, 5 deletions
ares/adig.c
with
14 additions
and
5 deletions
ares/CHANGES
+
4
−
0
View file @
eb612bfd
Changelog for the c-ares project
* Oct 18 2008 (Daniel Stenberg)
Charles Hardin made adig support a regular numerical dotted IP address for the
-s option as well.
* Oct 7 2008 (Yang Tse)
- Added --enable-optimize configure option to enable and disable compiler
optimizations to allow decoupled setting from --enable-debug.
...
...
This diff is collapsed.
Click to expand it.
ares/adig.c
+
10
−
5
View file @
eb612bfd
...
...
@@ -151,6 +151,7 @@ static const char *opcodes[] = {
"UPDATEA"
,
"UPDATED"
,
"UPDATEDA"
,
"UPDATEM"
,
"UPDATEMA"
,
"ZONEINIT"
,
"ZONEREF"
};
struct
in_addr
inaddr
;
static
const
char
*
rcodes
[]
=
{
"NOERROR"
,
"FORMERR"
,
"SERVFAIL"
,
"NXDOMAIN"
,
"NOTIMP"
,
"REFUSED"
,
...
...
@@ -212,11 +213,15 @@ int main(int argc, char **argv)
case
's'
:
/* Add a server, and specify servers in the option mask. */
hostent
=
gethostbyname
(
optarg
);
if
(
!
hostent
||
hostent
->
h_addrtype
!=
AF_INET
)
if
(
inet_pton
(
AF_INET
,
optarg
,
&
inaddr
)
<=
0
)
{
fprintf
(
stderr
,
"adig: server %s not found.
\n
"
,
optarg
);
return
1
;
hostent
=
gethostbyname
(
optarg
);
if
(
!
hostent
||
hostent
->
h_addrtype
!=
AF_INET
)
{
fprintf
(
stderr
,
"adig: server %s not found.
\n
"
,
optarg
);
return
1
;
}
memcpy
(
&
inaddr
,
hostent
->
h_addr
,
sizeof
(
struct
in_addr
));
}
options
.
servers
=
realloc
(
options
.
servers
,
(
options
.
nservers
+
1
)
*
sizeof
(
struct
in_addr
));
...
...
@@ -225,7 +230,7 @@ int main(int argc, char **argv)
fprintf
(
stderr
,
"Out of memory!
\n
"
);
return
1
;
}
memcpy
(
&
options
.
servers
[
options
.
nservers
],
hostent
->
h_
addr
,
memcpy
(
&
options
.
servers
[
options
.
nservers
],
&
in
addr
,
sizeof
(
struct
in_addr
));
options
.
nservers
++
;
optmask
|=
ARES_OPT_SERVERS
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment