mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Krzysztof Halasa <khc@pm.waw.pl>
To: <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] Generic HDLC patch for 2.5.3
Date: 04 Feb 2002 13:58:28 +0100	[thread overview]
Message-ID: <m3g04h5rpn.fsf@defiant.pm.waw.pl> (raw)
In-Reply-To: <20020202190242.C1740@havoc.gtf.org> <E16XAnc-00010K-00@the-village.bc.nu> <20020202200332.A3740@havoc.gtf.org> <20020203181302.C12963@fafner.intra.cogenit.fr> <20020203124614.A10139@havoc.gtf.org> <20020203230652.D12963@fafner.intra.cogenit.fr>
In-Reply-To: <20020203230652.D12963@fafner.intra.cogenit.fr>

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

  reply	other threads:[~2002-02-04 13:41 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-02-02 23:33 Krzysztof Halasa
2002-02-03  0:02 ` Jeff Garzik
2002-02-03  0:46   ` Alan Cox
2002-02-03  1:03     ` Jeff Garzik
2002-02-03 17:13       ` Francois Romieu
2002-02-03 17:46         ` Jeff Garzik
2002-02-03 22:06           ` Francois Romieu
2002-02-04 12:58             ` Krzysztof Halasa [this message]
2002-02-04 18:11               ` Francois Romieu
2002-02-05 12:11                 ` Krzysztof Halasa
2002-02-04 12:46           ` Krzysztof Halasa

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m3g04h5rpn.fsf@defiant.pm.waw.pl \
    --to=khc@pm.waw.pl \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®