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