Re: RFC: configuring net interfaces

From: Krzysztof Halasa (khc@intrepid.pm.waw.pl)
Date: Wed Mar 28 2001 - 18:03:29 EST


Francois Romieu <romieu@cogenit.fr> writes:

> > +struct hdlc_physical /* 10 bytes */
> > +{
> > + unsigned int interface;
> > + unsigned int clock_rate;
> > + unsigned short clock_type;
> > +};
>
> What do you mean with 'interface' ?

That's a physical interface like V.35 or RS232.

> [...]
> > +struct fr_protocol /* 12 bytes */
> > +{
> > + unsigned short lmi_type;
> > + unsigned short t391;
> > + unsigned short t392;
> > + unsigned short n391;
> > + unsigned short n392;
> > + unsigned short n393;
> > +};
> > +
> > +
>
> * n200, t200 ?

What's that?

> Do we put the crc type here ?

I don't think so. Frame Relay uses only standard CRC. Correct me if I'm
wrong.

> > /*
> > * Interface request structure used for socket
> > * ioctl's. All interface ioctl's must have parameter
> > @@ -95,6 +121,9 @@
> > char ifru_slave[IFNAMSIZ]; /* Just fits the size */
> > char ifru_newname[IFNAMSIZ];
> > char * ifru_data;
> > + struct hdlc_physical hdlc_phy;
> > + struct hdlc_protocol hdlc_proto;
> > + struct fr_protocol fr_proto;
> > } ifr_ifru;
> > };
>
> All the structs or just an union of ?

An (existing) union, of course. That's part of ifmap struct, with
meaning determined by ioctl command code.

> That is: is an SIOCXXX allowed to poke into different structs or not ?

Only one struct at a time :-)

> > --- linux-2.4.orig/include/linux/sockios.h Sun Nov 12 04:02:40 2000
> > +++ linux-2.4/include/linux/sockios.h Wed Mar 28 16:35:23 2001
> > @@ -76,6 +76,12 @@
> > #define SIOCSIFDIVERT 0x8945 /* Set frame diversion options */
> >
> > #define SIOCETHTOOL 0x8946 /* Ethtool interface */
> > +#define SIOCSHDLC_PHY 0x8947 /* set physical HDLC iface */
> > +#define SIOCGHDLC_PHY 0x8948 /* get physical HDLC iface */
>
> What type of operation do you mean by get/set ?

Get/set all device characteristics described by the struct.
For example, get/set interface type, clock type and rate. Or, with
other command(s), get/set Frame-Relay related parameters.

> While we're here, could we agree on the notion of raw hdlc, i.e. :
> - no address, no command. crc present (ARPHRD_RAWHDLC ?);
> - no address, no command, no crc (ARPHRD_PATHOLOGICHDLC ?).

Do we really need another ARPHRD for that?
BTW: What protocol(s) use such CRC-less HDLC?

-- 
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/



This archive was generated by hypermail 2b29 : Sat Mar 31 2001 - 21:00:20 EST