Home | History | Annotate | Download | only in libevent

Lines Matching refs:nameserver

169 	struct nameserver *ns;  /* the server which we last sent it */
211 struct nameserver {
219 struct nameserver *next, *prev;
229 static struct nameserver *server_head = NULL;
315 /* These are the timeout values for nameservers. If we find a nameserver is down */
320 static struct nameserver *nameserver_pick(void);
325 static void nameserver_send_probe(struct nameserver *const ns);
446 /* a libevent callback function which is called when a nameserver */
450 struct nameserver *const ns = (struct nameserver *) arg;
457 /* a libevent callback which is called when a nameserver probe (to see if */
461 nameserver_probe_failed(struct nameserver *const ns) {
465 /* This can happen if the nameserver acts in a way which makes us mark */
483 /* called when a nameserver has been deemed to have failed. For example, too */
486 nameserver_failed(struct nameserver *const ns, const char *msg) {
488 /* if this nameserver has already been marked as failed */
492 log(EVDNS_LOG_WARN, "Nameserver %s has failed: %s",
512 /* nameserver assigned yet */
533 nameserver_up(struct nameserver *const ns) {
535 log(EVDNS_LOG_WARN, "Nameserver %s is back up",
594 const struct nameserver *const last_ns = req->ns;
595 /* the last nameserver should have been marked as failing */
705 /* we regard these errors as marking a bad nameserver */
721 log(EVDNS_LOG_DEBUG, "Got a SERVERFAILED from nameserver %s; "
726 /* we got a good reply from the nameserver */
811 /* parses a raw request from a nameserver */
953 /* Parse a raw request (packet,length) sent to a nameserver port (port) from */
1122 static struct nameserver *
1124 struct nameserver *started_at = server_head, *picked;
1157 address_is_correct(struct nameserver *ns, struct sockaddr *sa, socklen_t slen)
1169 nameserver_read(struct nameserver *ns) {
1251 nameserver_write_waiting(struct nameserver *ns, char waiting) {
1266 /* a nameserver socket is ready for writing or reading */
1269 struct nameserver *ns = (struct nameserver *) arg;
1914 evdns_request_transmit_to(struct request *req, struct nameserver *server) {
1986 struct nameserver *const ns = (struct nameserver *) arg;
1999 nameserver_send_probe(struct nameserver *const ns) {
2001 /* here we need to send a probe to a given nameserver */
2041 const struct nameserver *server = server_head;
2056 struct nameserver *server = server_head, *started_at = server_head;
2062 struct nameserver *next = server->next;
2114 /* first check to see if we already have this nameserver */
2116 const struct nameserver *server = server_head, *const started_at = server_head;
2117 struct nameserver *ns;
2126 ns = (struct nameserver *) malloc(sizeof(struct nameserver));
2129 memset(ns, 0, sizeof(struct nameserver));
2146 log(EVDNS_LOG_DEBUG, "Added nameserver %s", debug_ntoa(address));
2148 /* insert this nameserver into the list of them */
2169 log(EVDNS_LOG_WARN, "Unable to add nameserver %s: error %d", debug_ntoa(address), err);
2279 /* if it has a nameserver assigned then this is going */
2703 if (!strcmp(first_token, "nameserver") && (flags & DNS_OPTION_NAMESERVERS)) {
2704 const char *const nameserver = NEXT_TOKEN;
2707 if (inet_aton(nameserver, &ina)) {
2887 log(EVDNS_LOG_DEBUG,"Could not add nameserver %s to list,error: %d",
2892 log(EVDNS_LOG_DEBUG,"Succesfully added %s as nameserver",ns->IpAddress.String);
2967 TRY(nt_key, "NameServer");
2969 TRY(interfaces_key, "NameServer");
2980 TRY(win_key, "NameServer");
3036 struct nameserver *server, *server_next;