On Wed, Jun 18, 2014 at 2:26 PM, Patrik Flykt <patrik.fl...@linux.intel.com> wrote: > On Mon, 2014-06-16 at 12:39 +0300, Patrik Flykt wrote: >> > 1) usage of struct ether_addr may prevent correct operation on >> > non-ethernet links, like Infiniband or PPP or GRE. They don't have >> > 6-byte MAC addresses, so anywhere that currently uses a MAC address >> > I'd suggest passing "u8*, u8 len" instead, to allow for non-ethernet >> > links. See ndisc_fill_addr_option() in the kernel... > > This one I have left for a bit later as no harm is done if the MAC > address is not set.
Makes sense to keep this on the TODO and sort it out later. We probably should do the same for the other libraries (where applicable). >> > 2) as I replied to Tom, could we keep RS/RA code together and not >> > tie it with DHCP stuff, since they aren't really related? DHCP is >> > the consumer of the M/O bits, but if DHCP isn't requested at all by >> > the router via the M/O bits, there's no reason for DHCP to ever be >> > involved in the process. I think it would be better to keep them >> > fully separate. >> >> That I can do. > > This is now done and the interface looks like the following: > > $ cat src/systemd/sd-icmp6-nd.h > ... > enum { > ICMP6_EVENT_ROUTER_ADVERTISMENT_NONE = 0, > ICMP6_EVENT_ROUTER_ADVERTISMENT_TIMEOUT = 1, > ICMP6_EVENT_ROUTER_ADVERTISMENT_OTHER = 2, > ICMP6_EVENT_ROUTER_ADVERTISMENT_MANAGED = 3, > }; > > typedef struct sd_icmp6_nd sd_icmp6_nd; > > typedef void(*sd_icmp6_nd_callback_t)(sd_icmp6_nd *nd, int event, > void *userdata); > > int sd_icmp6_nd_set_callback(sd_icmp6_nd *nd, sd_icmp6_nd_callback_t cb, > void *userdata); > int sd_icmp6_nd_set_index(sd_icmp6_nd *nd, int interface_index); > int sd_icmp6_nd_set_mac(sd_icmp6_nd *nd, const struct ether_addr *mac_addr); > > int sd_icmp6_nd_attach_event(sd_icmp6_nd *nd, sd_event *event, int priority); > int sd_icmp6_nd_detach_event(sd_icmp6_nd *nd); > sd_event *sd_icmp6_nd_get_event(sd_icmp6_nd *nd); > > sd_icmp6_nd *sd_icmp6_nd_ref(sd_icmp6_nd *nd); > sd_icmp6_nd *sd_icmp6_nd_unref(sd_icmp6_nd *nd); > int sd_icmp6_nd_new(sd_icmp6_nd **ret); > > int sd_icmp6_router_solicitation_start(sd_icmp6_nd *nd); > > > Did anyone have further comments on this initial patch set? Shall I send > the updated version to the mailing list or how do we want to proceed? Go ahead and push. It is probably simpler to make further suggestions/comments in terms of patches anyway. Cheers, Tom _______________________________________________ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel