DNSConf.i revision dafcb997e390efa4423883dafd100c975c4095d6
/*
* Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
* Copyright (C) 2000, 2001 Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
* REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
* AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
* INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
* LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
* OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
* PERFORMANCE OF THIS SOFTWARE.
*/
/* $Id: DNSConf.i,v 1.7 2004/03/05 05:04:22 marka 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();
}
};