/*
* Copyright (C) 2000, 2001, 2004, 2007, 2016 Internet Systems Consortium, Inc. ("ISC")
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
/* $Id: DNSConf.i,v 1.9 2007/06/19 23:47:07 tbox Exp $ */
%{
#include <stdio.h>
#include "DNSConf-macros.h"
#define DEBUG_PRINT 1
#if DEBUG_PRINT
#else
#define DBGPRINT ((void) 0)
#endif
static struct {
int count;
} ctx ;
typedef struct DNSConf {
} DNSConf;
}
int ctx_init(void) {
int returnval = 0;
DBGPRINT("Starting ctx_init()\n");
returnval = 1;
goto done;
}
goto done;
goto done;
goto done;
returnval = 1;
done:
DBGPRINT("Finished ctx_init()\n");
return (returnval);
}
void *ctx_destroy(void) {
DBGPRINT("starting ctx_destroy()\n");
DBGPRINT("count == 0\n");
return NULL;
}
DBGPRINT("count > 0\n");
return NULL;
}
DBGPRINT("destroying ctx\n");
DBGPRINT("finished ctx_destroy\n");
}
DNSConf *new_DNSConf() {
DBGPRINT("inside new_DNSConf\n");
return ptr;
}
DBGPRINT("deleting config context\n");
ctx_destroy();
}
}
DBGPRINT("inside delete_DNSConf\n");
}
DBGPRINT("inside parse\n");
if (!ctx_init())
return;
== ISC_R_SUCCESS) {
return 1;
} else {
return 0;
}
}
return 0;
return 1;
if (!ctx_init())
return 0;
return 0;
return 1;
}
DBGPRINT("inside print\n");
return;
}
#if 0
DBGPRINT("inside DNSConf_setdirectory\n");
if (!DNSConf_initctx(cfg))
return;
DBGPRINT("null pointer\n");
} else if (*directory == '\0') {
DBGPRINT("empty string\n");
} else
}
return NULL;
if (tmpres == ISC_R_NOTFOUND)
return NULL;
return dir;
}
#else
if (!DNSConf_initctx(cfg))
return;
if (transfersin == NULL) {
DBGPRINT("null pointer\n");
} else
}
unsigned int result;
return NULL;
if (tmpres == ISC_R_NOTFOUND)
return NULL;
return result;
}
#endif
%}
$target = sv_newmortal();
argvi++;
}
$target = sv_newmortal();
argvi++;
}
}
static unsigned int val;
}
struct DNSConf {
%addmethods {
DNSConf();
~DNSConf();
void setdirectory(const char *arg);
char *getdirectory();
void settransfersin(unsigned int arg);
unsigned int gettransfersin();
}
};