Skip to contentSkip to conversation

parse_interface and argv[optind-1] argument?

DISCUSSION Ozgur AKAN 2 participants 2 messages Apr 2, 2004 netfilter

lore
Share & tools
lore

Ozgur AKAN

author
#0 lore raw

Hi,
I could not find the value of first argument of the funciton below which is in iptables.c file.

static void parse_interface(const char *arg, char *vianame, unsigned char *mask)

"const char *arg" takes value of "argv[optind-1]". Is "argv[optind-1] " releated with modules/names?

thanks for help,
Ozgur AKAN

#1 lore raw
Quoted 8 lines · Ozgur AKAN

I could not find the value of first argument of the funciton below which is in iptables.c file.

static void parse_interface(const char *arg, char *vianame, unsigned char *mask)

"const char *arg" takes value of "argv[optind-1]". Is "argv[optind-1] " releated with modules/names?

argv[optind-1] is the current command line argument being processed.

Why the code is written in this manner instead of using optarg (with update in check_inverse) I do not know.

Regards
Henrik