196 |
void |
void |
197 |
scan_init(void) |
scan_init(void) |
198 |
{ |
{ |
199 |
node_t *p, *p2, *p3, *p4, *node; |
node_t *p, *p2, *p3, *p4; |
200 |
|
|
201 |
/* Setup each individual scanner */ |
/* Setup each individual scanner */ |
202 |
LIST_FOREACH(p, ScannerItemList.head) |
LIST_FOREACH(p, ScannerItemList.head) |
244 |
scan_gettype(pc->type), pc->port, scs->name); |
scan_gettype(pc->type), pc->port, scs->name); |
245 |
} |
} |
246 |
|
|
247 |
node = node_create(scs); |
list_add(scs, node_create(), &SCANNERS); |
|
list_add(&SCANNERS, node); |
|
248 |
} |
} |
249 |
|
|
250 |
/* Give scanners a list of masks they scan */ |
/* Give scanners a list of masks they scan */ |
270 |
if (OPT_DEBUG) |
if (OPT_DEBUG) |
271 |
log_printf("SCAN -> Linking the mask [%s] to scanner [%s]", mask, scannername); |
log_printf("SCAN -> Linking the mask [%s] to scanner [%s]", mask, scannername); |
272 |
|
|
273 |
node = node_create(xstrdup(mask)); |
list_add(xstrdup(mask), node_create(), &scs->masks); |
|
list_add(&scs->masks, node); |
|
274 |
} |
} |
275 |
|
|
276 |
break; |
break; |