resolved-dns-transaction.h revision a9da14e1e97ff774761966c2e1d83b0c6750b367
ec2c5e4398f9d65e5dfe61530f2556224733d1e6Lennart Poettering/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
ec2c5e4398f9d65e5dfe61530f2556224733d1e6Lennart Poettering This file is part of systemd.
ec2c5e4398f9d65e5dfe61530f2556224733d1e6Lennart Poettering Copyright 2014 Lennart Poettering
ec2c5e4398f9d65e5dfe61530f2556224733d1e6Lennart Poettering systemd is free software; you can redistribute it and/or modify it
ec2c5e4398f9d65e5dfe61530f2556224733d1e6Lennart Poettering under the terms of the GNU Lesser General Public License as published by
ec2c5e4398f9d65e5dfe61530f2556224733d1e6Lennart Poettering the Free Software Foundation; either version 2.1 of the License, or
ec2c5e4398f9d65e5dfe61530f2556224733d1e6Lennart Poettering (at your option) any later version.
ec2c5e4398f9d65e5dfe61530f2556224733d1e6Lennart Poettering systemd is distributed in the hope that it will be useful, but
ec2c5e4398f9d65e5dfe61530f2556224733d1e6Lennart Poettering WITHOUT ANY WARRANTY; without even the implied warranty of
ec2c5e4398f9d65e5dfe61530f2556224733d1e6Lennart Poettering MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
ec2c5e4398f9d65e5dfe61530f2556224733d1e6Lennart Poettering Lesser General Public License for more details.
ec2c5e4398f9d65e5dfe61530f2556224733d1e6Lennart Poettering You should have received a copy of the GNU Lesser General Public License
ec2c5e4398f9d65e5dfe61530f2556224733d1e6Lennart Poettering along with systemd; If not, see <http://www.gnu.org/licenses/>.
ec2c5e4398f9d65e5dfe61530f2556224733d1e6Lennart Poetteringtypedef struct DnsTransaction DnsTransaction;
ec2c5e4398f9d65e5dfe61530f2556224733d1e6Lennart Poetteringtypedef enum DnsTransactionState DnsTransactionState;
c3bc53e62459d7e566ffffeade41cd82bc6754f5Lennart Poetteringtypedef enum DnsTransactionSource DnsTransactionSource;
71d35b6b5563817dfbe757ab9e3b9f018b2db491Thomas Hindoe Paaboel Andersen#include "resolved-dns-answer.h"
71d35b6b5563817dfbe757ab9e3b9f018b2db491Thomas Hindoe Paaboel Andersen#include "resolved-dns-scope.h"
4667e00a61c2f60922558bc5e33ac9d3073a482cLennart Poettering /* The active server */
be808ea083fa07271116b4519c3c27fd20c5f077Tom Gundersen /* the features of the DNS server at time of transaction start */
ec2c5e4398f9d65e5dfe61530f2556224733d1e6Lennart Poettering /* TCP connection logic, if we need it */
801ad6a6a9cd8fbd58b9f9c27f20dbb3c87d47ddLennart Poettering /* Query candidates this transaction is referenced by and that
801ad6a6a9cd8fbd58b9f9c27f20dbb3c87d47ddLennart Poettering * shall be notified about this specific transaction
801ad6a6a9cd8fbd58b9f9c27f20dbb3c87d47ddLennart Poettering * completing. */
ec2c5e4398f9d65e5dfe61530f2556224733d1e6Lennart Poettering /* Zone items this transaction is referenced by and that shall
ec2c5e4398f9d65e5dfe61530f2556224733d1e6Lennart Poettering * be notified about completion. */
ec2c5e4398f9d65e5dfe61530f2556224733d1e6Lennart Poettering LIST_FIELDS(DnsTransaction, transactions_by_scope);
f52e61da047d7fc74e83f12dbbf87e0cbcc51c73Lennart Poetteringint dns_transaction_new(DnsTransaction **ret, DnsScope *s, DnsResourceKey *key);
ec2c5e4398f9d65e5dfe61530f2556224733d1e6Lennart PoetteringDnsTransaction* dns_transaction_free(DnsTransaction *t);
ec2c5e4398f9d65e5dfe61530f2556224733d1e6Lennart Poetteringvoid dns_transaction_gc(DnsTransaction *t);
ec2c5e4398f9d65e5dfe61530f2556224733d1e6Lennart Poetteringint dns_transaction_go(DnsTransaction *t);
ec2c5e4398f9d65e5dfe61530f2556224733d1e6Lennart Poetteringvoid dns_transaction_process_reply(DnsTransaction *t, DnsPacket *p);
ec2c5e4398f9d65e5dfe61530f2556224733d1e6Lennart Poetteringvoid dns_transaction_complete(DnsTransaction *t, DnsTransactionState state);
ec2c5e4398f9d65e5dfe61530f2556224733d1e6Lennart Poetteringconst char* dns_transaction_state_to_string(DnsTransactionState p) _const_;
ec2c5e4398f9d65e5dfe61530f2556224733d1e6Lennart PoetteringDnsTransactionState dns_transaction_state_from_string(const char *s) _pure_;
c3bc53e62459d7e566ffffeade41cd82bc6754f5Lennart Poetteringconst char* dns_transaction_source_to_string(DnsTransactionSource p) _const_;
c3bc53e62459d7e566ffffeade41cd82bc6754f5Lennart PoetteringDnsTransactionSource dns_transaction_source_from_string(const char *s) _pure_;
ec2c5e4398f9d65e5dfe61530f2556224733d1e6Lennart Poettering/* LLMNR Jitter interval, see RFC 4795 Section 7 */
6e0684729420912df019cc64d3f8a3c8290cc5f1Lennart Poettering#define LLMNR_JITTER_INTERVAL_USEC (100 * USEC_PER_MSEC)
ea12bcc78911fd3531955a799dbf6c5ac33bf567Daniel Mack/* mDNS Jitter interval, see RFC 6762 Section 5.2 */
ea12bcc78911fd3531955a799dbf6c5ac33bf567Daniel Mack#define MDNS_JITTER_MIN_USEC (20 * USEC_PER_MSEC)
ea12bcc78911fd3531955a799dbf6c5ac33bf567Daniel Mack#define MDNS_JITTER_RANGE_USEC (100 * USEC_PER_MSEC)
ec2c5e4398f9d65e5dfe61530f2556224733d1e6Lennart Poettering/* Maximum attempts to send DNS requests, across all DNS servers */
ec2c5e4398f9d65e5dfe61530f2556224733d1e6Lennart Poettering/* Maximum attempts to send LLMNR requests, see RFC 4795 Section 2.7 */