Skip to content

Commit

Permalink
Add IPv6 multicast hopcount option
Browse files Browse the repository at this point in the history
  • Loading branch information
eqvinox committed Jul 20, 2022
1 parent 7d02a25 commit d058cc7
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions xio-ip6.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ const struct optdesc opt_ipv6_flowinfo= { "ipv6-flowinfo","flowinfo",OPT_IPV6_FL
const struct optdesc opt_ipv6_hoplimit= { "ipv6-hoplimit","hoplimit",OPT_IPV6_HOPLIMIT,GROUP_SOCK_IP6, PH_PASTSOCKET, TYPE_INT, OFUNC_SOCKOPT, SOL_IPV6, IPV6_HOPLIMIT };
#endif
const struct optdesc opt_ipv6_unicast_hops= { "ipv6-unicast-hops","unicast-hops",OPT_IPV6_UNICAST_HOPS,GROUP_SOCK_IP6, PH_PASTSOCKET, TYPE_INT, OFUNC_SOCKOPT, SOL_IPV6, IPV6_UNICAST_HOPS };
#ifdef IPV6_MULTICAST_HOPS
const struct optdesc opt_ipv6_multicast_hops= { "ipv6-multicast-hops","multicast-hops",OPT_IPV6_MULTICAST_HOPS,GROUP_SOCK_IP6, PH_PASTSOCKET, TYPE_INT, OFUNC_SOCKOPT, SOL_IPV6, IPV6_MULTICAST_HOPS };
#endif
#ifdef IPV6_RECVHOPLIMIT
const struct optdesc opt_ipv6_recvhoplimit= { "ipv6-recvhoplimit","recvhoplimit",OPT_IPV6_RECVHOPLIMIT,GROUP_SOCK_IP6, PH_PASTSOCKET, TYPE_INT, OFUNC_SOCKOPT, SOL_IPV6, IPV6_RECVHOPLIMIT };
#endif
Expand Down
1 change: 1 addition & 0 deletions xio-ip6.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ extern const struct optdesc opt_ipv6_dstopts;
extern const struct optdesc opt_ipv6_recvdstopts;
extern const struct optdesc opt_ipv6_hopopts;
extern const struct optdesc opt_ipv6_unicast_hops;
extern const struct optdesc opt_ipv6_multicast_hops;
extern const struct optdesc opt_ipv6_recvhopopts;
extern const struct optdesc opt_ipv6_flowinfo;
extern const struct optdesc opt_ipv6_hoplimit;
Expand Down
2 changes: 2 additions & 0 deletions xioopts.c
Original file line number Diff line number Diff line change
Expand Up @@ -806,6 +806,7 @@ const struct optname optionnames[] = {
IF_IP6 ("ipv6-join-group", &opt_ipv6_join_group)
IF_IP6 ("ipv6-join-group-source", &opt_ipv6_join_group_source)
#endif
IF_IP6 ("ipv6-multicast-hops", &opt_ipv6_multicast_hops)
#ifdef IPV6_PKTINFO
IF_IP6 ("ipv6-pktinfo", &opt_ipv6_pktinfo)
#endif
Expand Down Expand Up @@ -957,6 +958,7 @@ const struct optname optionnames[] = {
IF_IP ("mtudiscover", &opt_ip_mtu_discover)
#endif
IF_TUN ("multicast", &opt_iff_multicast)
IF_IP6 ("multicast-hops", &opt_ipv6_multicast_hops)
IF_IP ("multicast-if", &opt_ip_multicast_if)
IF_IP ("multicast-loop", &opt_ip_multicast_loop)
IF_IP ("multicast-ttl", &opt_ip_multicast_ttl)
Expand Down
1 change: 1 addition & 0 deletions xioopts.h
Original file line number Diff line number Diff line change
Expand Up @@ -375,6 +375,7 @@ enum e_optcode {
OPT_IPV6_RTHDR,
OPT_IPV6_TCLASS,
OPT_IPV6_UNICAST_HOPS,
OPT_IPV6_MULTICAST_HOPS,
OPT_IPV6_V6ONLY,
#if 0 /* see Linux: man 7 netlink; probably not what we need yet */
OPT_IO_SIOCGIFNAME,
Expand Down

0 comments on commit d058cc7

Please sign in to comment.