CBMC
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
netdb.c
Go to the documentation of this file.
1/* FUNCTION: gethostbyname */
2
3#ifdef _MSC_VER
4#include <windows.h>
5#else
6#include <netdb.h>
7#endif
8
10
11struct hostent *gethostbyname(const char *name)
12{
14 #ifdef __CPROVER_STRING_ABSTRACTION
16 "gethostbyname zero-termination of name argument");
17 #endif
18 (void)*name;
19
21 if(error) return 0;
22
23 // quite restrictive, as will alias between calls
24 static struct hostent result;
25
26 // we whould be filling in the fields of this
27 return &result;
28}
29
30/* FUNCTION: gethostbyaddr */
31
32#ifdef _MSC_VER
33#include <windows.h>
34#else
35#include <netdb.h>
36#endif
37
39
40struct hostent *gethostbyaddr(const void *addr, socklen_t len, int type)
41{
43 (void)*(char*)addr;
44 (void)len;
45 (void)type;
46
48 if(error) return 0;
49
50 // quite restrictive, as will alias between calls
51 static struct hostent result;
52
53 // we whould be filling in the fields of this
54 return &result;
55}
56
57/* FUNCTION: gethostent */
58
59// There does not appear to be a Windows variant of gethostent
60#include <netdb.h>
61
63
64struct hostent *gethostent(void)
65{
67
69 if(error) return 0;
70
71 // quite restrictive, as will alias between calls
72 static struct hostent result;
73
74 // we whould be filling in the fields of this
75 return &result;
76}
ait supplies three of the four components needed: an abstract interpreter (in this case handling func...
Definition ai.h:562
ait()
Definition ai.h:565
void __CPROVER_precondition(__CPROVER_bool precondition, const char *description)
_Bool __CPROVER_is_zero_string(const void *)
struct hostent * gethostent(void)
Definition netdb.c:64
__CPROVER_bool __VERIFIER_nondet___CPROVER_bool(void)
struct hostent * gethostbyaddr(const void *addr, socklen_t len, int type)
Definition netdb.c:40
struct hostent * gethostbyname(const char *name)
Definition netdb.c:11