#ifndef _CMDLINE_H #define _CMDLINE_H 1 /* Maximum permissible lengths for command line parameters */ #define MAX_MACHINE_NAME_LEN 8 #define MAX_ADDRESS_LEN 64 #define MAX_INTERFACE_LEN 16 /* Values for the /SWITCH command line argument */ #define SWITCH_OFF 0 #define SWITCH_ON 1 #define SWITCH_TOGGLE 2 /* Values for the /INTERFACE command line argument */ #define INTERFACE_CLI 0 #define INTERFACE_SMG 1 #define INTERFACE_DECW 2 /* * Structure to hold the results of parsing the command line */ struct rcu_options { char machine_value[MAX_MACHINE_NAME_LEN+1]; char address_value[MAX_ADDRESS_LEN+1]; unsigned short port_value; unsigned short switch_value; unsigned short direction_value; unsigned short interface_value; unsigned machine_flag : 1; unsigned address_flag : 1; unsigned port_flag : 1; unsigned switch_flag : 1; unsigned direction_flag : 1; unsigned interface_flag : 1; }; /* declaration for the defined functions */ extern unsigned long parse_cmdline(struct rcu_options *options); #endif