Messages in this thread | | | Subject | Re: [PATCH] Generic HDLC patch for 2.5.3 | From | Krzysztof Halasa <> | Date | 04 Feb 2002 13:58:28 +0100 |
| |
Francois Romieu <romieu@cogenit.fr> writes:
> --- linux-2.5.3-kh/include/linux/hdlc/ioctl.h Thu Jan 1 01:00:00 1970 > +++ linux-2.5.3/include/linux/hdlc/ioctl.h Sun Feb 3 21:46:11 2002 > +typedef struct { > + unsigned short encoding; > + unsigned short parity; > +} raw_proto;
This isn't for "raw" protocol. It's for raw _HDLC_ (or "just" HDLC), so I think a better name is still hdlc_proto.
> +struct hdlc_settings { > + union { > + raw_proto raw; > + cisco_proto cisco; > + fr_proto fr; > + fr_proto_pvc fr_pvc; > + sync_serial_settings sync; > + te1_settings te1; > + } hdlcs_hdlcu; > +};
I want to avoid such a union, because it's possible some of future member structs will be large.
> @@ -95,10 +96,13 @@ struct ifmap > struct if_settings > { > unsigned int type; /* Type of physical device or protocol */ > - unsigned int data_length; /* device/protocol data length */ > - void * data; /* pointer to data, ignored if length = 0 */ > + union { > + /* {atm/eth/dsl}_settings anyone ? */ > + struct hdlc_settings ifsu_hdlc; > + } ifs_ifsu; > };
And here. It's currently impossible, as if_settings must be 16 bytes long at most. Unless, of course, we have a variable-sized ifreq. -- Krzysztof Halasa Network Administrator - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |