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
6c9d96e8
Commit
6c9d96e8
authored
21 years ago
by
Daniel Stenberg
Browse files
Options
Downloads
Patches
Plain Diff
Dirk Manske's ares_cancel() function was added.
parent
f840e519
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
ares/CHANGES
+11
-0
11 additions, 0 deletions
ares/CHANGES
ares/Makefile.in
+2
-3
2 additions, 3 deletions
ares/Makefile.in
ares/ares.h
+1
-1
1 addition, 1 deletion
ares/ares.h
ares/ares_cancel.3
+37
-0
37 additions, 0 deletions
ares/ares_cancel.3
ares/ares_cancel.c
+44
-0
44 additions, 0 deletions
ares/ares_cancel.c
with
95 additions
and
4 deletions
ares/CHANGES
+
11
−
0
View file @
6c9d96e8
Changelog for the c-ares project
* April 1, 2004
- Dirk Manske provided a new function that is now named ares_cancel(). It is
used to cancel/cleanup a resolve/request made using ares functions on the
given ares channel. It does not destroy/kill the ares channel itself.
- Dominick Meglio cleaned up the formatting in several man pages.
* March 30, 2004
- Dominick Meglio's new ares_expand_string. A helper function when decoding
incoming DNS packages.
...
...
@@ -81,3 +90,5 @@ Version 1.0-pre1 (8 October 2003)
- Daniel Stenberg adjusted the windows port
- liren at vivisimo.com made the initial windows port
* Imported the sources from ares 1.1.1
This diff is collapsed.
Click to expand it.
ares/Makefile.in
+
2
−
3
View file @
6c9d96e8
...
...
@@ -26,15 +26,14 @@ OBJS= ares__close_sockets.o ares__get_hostent.o ares__read_line.o \
ares_gethostbyname.o ares_init.o ares_mkquery.o ares_parse_a_reply.o
\
ares_parse_ptr_reply.o ares_process.o ares_query.o ares_search.o
\
ares_send.o ares_strerror.o ares_timeout.o ares_version.o
\
ares_expand_string.o
ares_expand_string.o
ares_cancel.o
MANPAGES
=
ares_destroy.3 ares_expand_name.3 ares_expand_string.3 ares_fds.3
\
ares_free_hostent.3 ares_free_string.3 ares_gethostbyaddr.3
\
ares_gethostbyname.3 ares_init.3 ares_init_options.3 ares_mkquery.3
\
ares_parse_a_reply.3 ares_parse_ptr_reply.3 ares_process.3
\
ares_query.3 ares_search.3 ares_send.3 ares_strerror.3 ares_timeout.3
\
ares_version.3
ares_version.3 ares_cancel.3
$(LIB)
:
${OBJS}
ar cru
$@
${
OBJS
}
...
...
This diff is collapsed.
Click to expand it.
ares/ares.h
+
1
−
1
View file @
6c9d96e8
...
...
@@ -105,7 +105,7 @@ int ares_init(ares_channel *channelptr);
int
ares_init_options
(
ares_channel
*
channelptr
,
struct
ares_options
*
options
,
int
optmask
);
void
ares_destroy
(
ares_channel
channel
);
void
ares_cancel
(
ares_channel
channel
);
void
ares_send
(
ares_channel
channel
,
const
unsigned
char
*
qbuf
,
int
qlen
,
ares_callback
callback
,
void
*
arg
);
void
ares_query
(
ares_channel
channel
,
const
char
*
name
,
int
dnsclass
,
...
...
This diff is collapsed.
Click to expand it.
ares/ares_cancel.3
0 → 100644
+
37
−
0
View file @
6c9d96e8
.\" $Id$
.\"
.\" Copyright 1998 by the Massachusetts Institute of Technology.
.\"
.\" Permission to use, copy, modify, and distribute this
.\" software and its documentation for any purpose and without
.\" fee is hereby granted, provided that the above copyright
.\" notice appear in all copies and that both that copyright
.\" notice and this permission notice appear in supporting
.\" documentation, and that the name of M.I.T. not be used in
.\" advertising or publicity pertaining to distribution of the
.\" software without specific, written prior permission.
.\" M.I.T. makes no representations about the suitability of
.\" this software for any purpose. It is provided "as is"
.\" without express or implied warranty.
.\"
.TH ARES_CANCEL 3 "31 March 2004"
.SH NAME
ares_cancel \- Cancel a resolve
.SH SYNOPSIS
.nf
.B #include <ares.h>
.PP
.B int ares_cancel(ares_channel \fIchannel\fP)
.fi
.SH DESCRIPTION
The \fBares_cancel\fP function cancels all lookups/requests made on the the
name service channel identified by \fIchannel\fP. \fBares_cancel\fP invokes
the callbacks for each pending query on the channel, passing a status of
.BR ARES_ETIMEOUT .
These calls give the callbacks a chance to clean up any state which
might have been stored in their arguments.
.SH SEE ALSO
.BR ares_init (3)
.BR ares_destroy (3)
.SH AUTHOR
Dirk Manske
This diff is collapsed.
Click to expand it.
ares/ares_cancel.c
0 → 100644
+
44
−
0
View file @
6c9d96e8
/* Copyright 1998 by the Massachusetts Institute of Technology.
*
* Permission to use, copy, modify, and distribute this
* software and its documentation for any purpose and without
* fee is hereby granted, provided that the above copyright
* notice appear in all copies and that both that copyright
* notice and this permission notice appear in supporting
* documentation, and that the name of M.I.T. not be used in
* advertising or publicity pertaining to distribution of the
* software without specific, written prior permission.
* M.I.T. makes no representations about the suitability of
* this software for any purpose. It is provided "as is"
* without express or implied warranty.
*/
#include
<stdlib.h>
#include
"ares.h"
#include
"ares_private.h"
/*
* ares_cancel() cancels a ongoing request/resolve that might be going on on
* the given channel. It does NOT kill the channel, use ares_destroy() for
* that.
*/
void
ares_cancel
(
ares_channel
channel
)
{
struct
query
*
query
,
*
next
;
int
i
;
for
(
query
=
channel
->
queries
;
query
;
query
=
next
)
{
next
=
query
->
next
;
query
->
callback
(
query
->
arg
,
ARES_ETIMEOUT
,
NULL
,
0
);
free
(
query
->
tcpbuf
);
free
(
query
->
skip_server
);
free
(
query
);
}
channel
->
queries
=
NULL
;
if
(
!
(
channel
->
flags
&
ARES_FLAG_STAYOPEN
))
{
for
(
i
=
0
;
i
<
channel
->
nservers
;
i
++
)
ares__close_sockets
(
&
channel
->
servers
[
i
]);
}
}
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