clientinfo.c revision 0c27b3fe77ac1d5094ba3521e8142d9e7973133f
9ec7787531611654e8f50932473aa48963eaba55Trond Norbye/*
9ec7787531611654e8f50932473aa48963eaba55Trond Norbye * Copyright (C) 2011, 2014, 2016 Internet Systems Consortium, Inc. ("ISC")
9ec7787531611654e8f50932473aa48963eaba55Trond Norbye *
9ec7787531611654e8f50932473aa48963eaba55Trond Norbye * This Source Code Form is subject to the terms of the Mozilla Public
9ec7787531611654e8f50932473aa48963eaba55Trond Norbye * License, v. 2.0. If a copy of the MPL was not distributed with this
9ec7787531611654e8f50932473aa48963eaba55Trond Norbye * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9ec7787531611654e8f50932473aa48963eaba55Trond Norbye */
9ec7787531611654e8f50932473aa48963eaba55Trond Norbye
9ec7787531611654e8f50932473aa48963eaba55Trond Norbye/*! \file */
9ec7787531611654e8f50932473aa48963eaba55Trond Norbye
9ec7787531611654e8f50932473aa48963eaba55Trond Norbye#include "config.h"
9ec7787531611654e8f50932473aa48963eaba55Trond Norbye
9ec7787531611654e8f50932473aa48963eaba55Trond Norbye#include <dns/clientinfo.h>
9ec7787531611654e8f50932473aa48963eaba55Trond Norbye
9ec7787531611654e8f50932473aa48963eaba55Trond Norbyevoid
9ec7787531611654e8f50932473aa48963eaba55Trond Norbyedns_clientinfomethods_init(dns_clientinfomethods_t *methods,
9ec7787531611654e8f50932473aa48963eaba55Trond Norbye dns_clientinfo_sourceip_t sourceip)
9ec7787531611654e8f50932473aa48963eaba55Trond Norbye{
9ec7787531611654e8f50932473aa48963eaba55Trond Norbye methods->version = DNS_CLIENTINFOMETHODS_VERSION;
9ec7787531611654e8f50932473aa48963eaba55Trond Norbye methods->age = DNS_CLIENTINFOMETHODS_AGE;
9ec7787531611654e8f50932473aa48963eaba55Trond Norbye methods->sourceip = sourceip;
9ec7787531611654e8f50932473aa48963eaba55Trond Norbye}
9ec7787531611654e8f50932473aa48963eaba55Trond Norbye
9ec7787531611654e8f50932473aa48963eaba55Trond Norbyevoid
9ec7787531611654e8f50932473aa48963eaba55Trond Norbyedns_clientinfo_init(dns_clientinfo_t *ci, void *data, void *versionp) {
9ec7787531611654e8f50932473aa48963eaba55Trond Norbye ci->version = DNS_CLIENTINFO_VERSION;
9ec7787531611654e8f50932473aa48963eaba55Trond Norbye ci->data = data;
9ec7787531611654e8f50932473aa48963eaba55Trond Norbye ci->dbversion = versionp;
9ec7787531611654e8f50932473aa48963eaba55Trond Norbye}
9ec7787531611654e8f50932473aa48963eaba55Trond Norbye