| 149 | |
| 150 | |
| 151 | int main(int argc, char *argv[]) |
| 152 | { |
| 153 | ROT *my_rot; /* handle to rot (instance) */ |
| 154 | rot_model_t my_model = ROT_MODEL_DUMMY; |
| 155 | |
| 156 | int retcode; /* generic return code from functions */ |
| 157 | |
| 158 | int verbose = RIG_DEBUG_NONE; |
| 159 | int show_conf = 0; |
| 160 | int dump_caps_opt = 0; |
| 161 | const char *rot_file = NULL; |
| 162 | const char *rot_file2 = NULL; |
| 163 | int serial_rate = 0; |
| 164 | char conf_parms[MAXCONFLEN] = ""; |
| 165 | |
| 166 | struct addrinfo hints, *result, *saved_result; |
| 167 | int sock_listen; |
| 168 | int reuseaddr = 1; |
| 169 | char host[NI_MAXHOST]; |
| 170 | char serv[NI_MAXSERV]; |
| 171 | |
| 172 | pthread_t thread; |
| 173 | pthread_attr_t attr; |
| 174 | struct handle_data *arg; |
| 175 | |
| 176 | rig_set_debug(verbose); |
| 177 | while (1) |
| 178 | { |
| 179 | int c; |
| 180 | int option_index = 0; |
| 181 | char dummy[2]; |
| 182 | |
| 183 | c = getopt_long(argc, argv, SHORT_OPTIONS, long_options, &option_index); |
| 184 | |
| 185 | if (c == -1) |
| 186 | { |
| 187 | break; |
| 188 | } |
| 189 | |
| 190 | switch (c) |
| 191 | { |
| 192 | case 'h': |
| 193 | usage(stdout); |
| 194 | exit(0); |
| 195 | |
| 196 | case 'V': |
| 197 | version(); |
| 198 | exit(0); |
| 199 | |
| 200 | case 'm': |
| 201 | my_model = atoi(optarg); |
| 202 | break; |
| 203 | |
| 204 | case 'r': |
| 205 | rot_file = optarg; |
| 206 | break; |
| 207 | |
| 208 | case 'R': |
nothing calls this directly
no test coverage detected