Go to the source code of this file.
◆ main()
Definition at line 67 of file check_ipcheck.c.
References GW_INFO, gwlib_init(), gwlib_shutdown(), is_allowed_ip(), log_set_output_level(), octstr_get_cstr, octstr_imm(), and panic.
   78     int should_be_allowed;
    80     { 
"127.0.0.1", 
"", 
"127.0.0.1", 1 },
    81     { 
"127.0.0.1", 
"", 
"127.0.0.2", 1 },
    82     { 
"127.0.0.1", 
"*.*.*.*", 
"127.0.0.1", 1 },
    83     { 
"127.0.0.1", 
"*.*.*.*", 
"1.2.3.4", 0 },
    84     { 
"127.0.0.1", 
"127.0.0.*", 
"1.2.3.4", 1 },
    85     { 
"127.0.0.1", 
"127.0.0.*", 
"127.0.0.2", 0 },
    91     for (i = 0; (size_t) i < 
sizeof(tab) / 
sizeof(tab[0]); ++i) {
    96     if (!!result != !!tab[i].should_be_allowed) {
    97         panic(0, 
"is_allowed_ip did not work for "    98                  "allowed=<%s> denied=<%s> ip=<%s>, "    99              "returned %d should be %d",
   104              tab[i].should_be_allowed);
 #define octstr_get_cstr(ostr)
int is_allowed_ip(Octstr *allow_ip, Octstr *deny_ip, Octstr *ip)
Octstr * octstr_imm(const char *cstr)
void log_set_output_level(enum output_level level)
void gwlib_shutdown(void)