K 10 svn:author V 7 glebius K 8 svn:date V 27 2014-12-31T09:41:25.981605Z K 7 svn:log V 1168 A draft of the new API for interface drivers, a major milestone in the project "opaque ifnet". New API for drivers: - Drivers do not include if_var.h, they do include if.h only. Thus, drivers do not know "struct ifnet". They operate with a pointer to it, typedefed as "if_t". - Drivers declare static "struct ifdriver", that describes common properties of all interfaces handled by this driver. Common properties include: input/output/ioctl/etc methods, driver name, interface type, address length, etc. - In device_attach() method drivers prepare on stack a "struct if_attach_args", which describes zillion of parameters that if_attach() would handle. The if_attach() can't fail. The plan is "struct if_attach_args" to be versioned, so that in future we can keep ABI compat shims. - During runtime drivers have a handful of methods to work with ifnet: get softc, get/modify various flags. The kernel after this commit isn't compilable, even w/o any driver in place. It was intentionally separated to outline important part of changes from mechanical changes. More commits to follow this one. Sponsored by: Netflix Sponsored by: Nginx, Inc. END