1
0
Fork 0
mirror of https://repo.or.cz/socat.git synced 2025-07-15 07:33:25 +00:00

New option retrieve-vlan (experimental)

This commit is contained in:
Gerhard Rieger 2023-09-30 15:18:39 +02:00
parent 11d1e9e11f
commit b5640dd707
24 changed files with 273 additions and 55 deletions

View file

@ -1397,6 +1397,9 @@ const struct optname optionnames[] = {
IF_PROXY ("resolve", &opt_proxy_resolve)
#ifdef IP_RETOPTS
IF_IP ("retopts", &opt_ip_retopts)
#endif
#if WITH_INTERFACE && defined(PACKET_AUXDATA)
IF_SOCKET ("retrieve-vlan", &opt_retrieve_vlan)
#endif
IF_RETRY ("retry", &opt_retry)
IF_SOCKET ("reuseaddr", &opt_so_reuseaddr)
@ -3710,6 +3713,17 @@ int applyopts(int fd, struct opt *opts, enum e_phase phase) {
}
break;
#if _WITH_INTERFACE
case OPT_RETRIEVE_VLAN:
if (!xioparms.experimental) {
Warn("option retrieve-vlan is experimental");
}
if (_interface_setsockopt_auxdata(fd, 1) < 0) {
return -1;
}
break;
#endif /* _WITH_INTERFACE */
default: Error1("applyopts(): option \"%s\" not implemented",
opt->desc->defname);
opt->desc = ODESC_ERROR; ++opt; continue;