MCPcopy Index your code
hub / github.com/F-Stack/f-stack / main

Function main

tools/ndp/ndp.c:225–382  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

223#endif
224
225int
226main(int argc, char **argv)
227{
228 int ch, mode = 0;
229 char *arg = NULL;
230
231 pid = getpid();
232 thiszone = gmt2local(0);
233#ifndef FSTACK
234 while ((ch = getopt(argc, argv, "acd:f:Ii:nprstA:HPR")) != -1)
235#else
236 ff_ipc_init();
237 while ((ch = getopt(argc, argv, "acd:f:Ii:nprstA:HPRC:")) != -1)
238#endif
239 switch (ch) {
240 case 'a':
241 case 'c':
242 case 'p':
243 case 'r':
244 case 'H':
245 case 'P':
246 case 'R':
247 case 's':
248 case 'I':
249 if (mode) {
250 usage();
251 /*NOTREACHED*/
252 }
253 mode = ch;
254 arg = NULL;
255 break;
256 case 'f':
257 exit(file(optarg) ? 1 : 0);
258 case 'd':
259 case 'i':
260 if (mode) {
261 usage();
262 /*NOTREACHED*/
263 }
264 mode = ch;
265 arg = optarg;
266 break;
267 case 'n':
268 nflag = 1;
269 break;
270 case 't':
271 tflag = 1;
272 break;
273 case 'A':
274 if (mode) {
275 usage();
276 /*NOTREACHED*/
277 }
278 mode = 'a';
279 repeat = atoi(optarg);
280 if (repeat < 0) {
281 usage();
282 /*NOTREACHED*/

Callers

nothing calls this directly

Calls 15

gmt2localFunction · 0.85
ff_ipc_initFunction · 0.85
ff_set_proc_idFunction · 0.85
strcmpFunction · 0.85
if_nametoindexFunction · 0.85
setdefifFunction · 0.85
getdefifFunction · 0.85
plistFunction · 0.85
ifinfoFunction · 0.85
rtrlistFunction · 0.85
harmonize_rtrFunction · 0.85
pfx_flushFunction · 0.85

Tested by

no test coverage detected