3 //=============================================================================
7 * @author Douglas C. Schmidt
9 //=============================================================================
20 * @brief This file is used to provide a consolidated Options handling facility.
28 PRINT_LOGIN_NAME
= 02,
30 STAND_ALONE_SERVER
= 010,
31 SORT_BY_LOGIN_NAME
= 020,
32 SORT_BY_REAL_NAME
= 040,
33 USE_VERBOSE_FORMAT
= 0100,
37 // Different types of messages.
40 PROTO_USR
= 1, // Only return info on one user.
41 PROTO_ALL
= 2, // Return info on all users logged in around the system.
42 PROTO_FLO
= 3, // Return info on friends logged in.
43 PROTO_RUSER
= 4, // Return info in ruser format!
44 PROTO_RWHO
= 5, // Return info in rwho format.
45 PROTO_WHO
= 6, // Return info in who format.
46 PROTO_RUPTIME
= 7 // Return info in ruptime format.
49 static void set_options (int argc
, char *argv
[]);
50 static void set_opt (Option_Types opt
);
51 static int get_opt (Option_Types opt
);
53 static short port_number
;
54 static Protocol_Types protocol_type
;
55 static int max_server_timeout
;
56 static char *program_name
;
57 static const char *friend_file
;
58 static char *user_name
;
60 static void print_usage_and_die
[[noreturn
]] (int long_msg
);
61 static unsigned int option_word
;
64 #endif /* _OPTIONS_H */