int opt_random_data_on = 0;
int opt_check_source_on = 0;
int opt_size_on = 0;
+int opt_oiface_on = 0;
+int opt_bindiface_on = 0;
int opt_timestamp_on = 0;
int opt_timestamp_format = 0;
int opt_icmp_request_typ = 0;
\ No newline at end of file
extern int opt_random_data_on;
extern int opt_check_source_on;
extern int opt_size_on;
+extern int opt_oiface_on;
+extern int opt_bindiface_on;
extern int opt_timestamp_on;
extern int opt_timestamp_format;
extern int opt_icmp_request_typ;
} else if (strstr(optparse_state.optlongname, "seqmap-timeout") != NULL) {
opt_seqmap_timeout = strtod_strict(optparse_state.optarg) * 1000000;
} else if (strstr(optparse_state.optlongname, "oiface") != NULL) {
+ opt_oiface_on = 1;
#ifdef IP_PKTINFO
if (socket4 >= 0) {
socket_set_outgoing_iface_ipv4(socket4, optparse_state.optarg);
exit(1);
case 'I':
+ opt_bindiface_on = 1;
#ifdef SO_BINDTODEVICE
if (socket4 >= 0) {
if (p_setsockopt(suid, socket4, SOL_SOCKET, SO_BINDTODEVICE, optparse_state.optarg, strlen(optparse_state.optarg))) {
exit(1);
}
+ if (opt_oiface_on && opt_bindiface_on) {
+ fprintf(stderr, "%s: specify only --oiface or -I, --iface\n", prog);
+ exit(1);
+ }
+
if (opt_count_on && opt_loop_on) {
fprintf(stderr, "%s: specify only one of c, l\n", prog);
exit(1);