| 1 |
/**************************************************************************/ |
| 2 |
/* */ |
| 3 |
/* This file is part of Frama-C. */ |
| 4 |
/* */ |
| 5 |
/* Copyright (C) 2007-2022 */ |
| 6 |
/* CEA (Commissariat à l'énergie atomique et aux énergies */ |
| 7 |
/* alternatives) */ |
| 8 |
/* */ |
| 9 |
/* you can redistribute it and/or modify it under the terms of the GNU */ |
| 10 |
/* Lesser General Public License as published by the Free Software */ |
| 11 |
/* Foundation, version 2.1. */ |
| 12 |
/* */ |
| 13 |
/* It is distributed in the hope that it will be useful, */ |
| 14 |
/* but WITHOUT ANY WARRANTY; without even the implied warranty of */ |
| 15 |
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ |
| 16 |
/* GNU Lesser General Public License for more details. */ |
| 17 |
/* */ |
| 18 |
/* See the GNU Lesser General Public License version 2.1 */ |
| 19 |
/* for more details (enclosed in the file licenses/LGPLv2.1). */ |
| 20 |
/* */ |
| 21 |
/**************************************************************************/ |
| 22 |
|
| 23 |
#ifndef _RESOLV_H |
| 24 |
#define _RESOLV_H 1 |
| 25 |
#include "features.h" |
| 26 |
__PUSH_FC_STDLIB |
| 27 |
|
| 28 |
__BEGIN_DECLS |
| 29 |
|
| 30 |
// Note: resolv.h is neither ISO-C nor POSIX |
| 31 |
|
| 32 |
struct __res_state; |
| 33 |
typedef struct __res_state *res_state; |
| 34 |
|
| 35 |
// deprecated |
| 36 |
extern int res_init(void); |
| 37 |
|
| 38 |
extern int res_ninit(res_state statep); |
| 39 |
|
| 40 |
extern int res_nquery(res_state statep, |
| 41 |
const char *dname, int class, int type, |
| 42 |
unsigned char *answer, int anslen); |
| 43 |
|
| 44 |
extern int res_nsearch(res_state statep, |
| 45 |
const char *dname, int class, int type, |
| 46 |
unsigned char *answer, int anslen); |
| 47 |
|
| 48 |
extern int res_nquerydomain(res_state statep, |
| 49 |
const char *name, const char *domain, |
| 50 |
int class, int type, unsigned char *answer, |
| 51 |
int anslen); |
| 52 |
|
| 53 |
extern int res_nmkquery(res_state statep, |
| 54 |
int op, const char *dname, int class, |
| 55 |
int type, const unsigned char *data, int datalen, |
| 56 |
const unsigned char *newrr, |
| 57 |
unsigned char *buf, int buflen); |
| 58 |
|
| 59 |
extern int res_nsend(res_state statep, |
| 60 |
const unsigned char *msg, int msglen, |
| 61 |
unsigned char *answer, int anslen); |
| 62 |
|
| 63 |
extern int dn_comp(const char *exp_dn, unsigned char *comp_dn, |
| 64 |
int length, unsigned char **dnptrs, |
| 65 |
unsigned char **lastdnptr); |
| 66 |
|
| 67 |
extern int dn_expand(const unsigned char *msg, |
| 68 |
const unsigned char *eomorig, |
| 69 |
const unsigned char *comp_dn, char *exp_dn, |
| 70 |
int length); |
| 71 |
|
| 72 |
__END_DECLS |
| 73 |
|
| 74 |
__POP_FC_STDLIB |
| 75 |
#endif |