Re: adding an address family

2001-01-17 Thread Mark Santcroos

On Tue, Jan 16, 2001 at 11:34:09PM -0600, Michael C . Wu wrote:
 | Ok I'm trying to make a port of the IrDA stack on Linux to FreeBSD.
 | I've now written the driver for the chipset on my laptop, and I am ready
 | with that to pass data to an upper layer. 
 
 Basically, we really do not want the Linux solution of doing IrDA.
 Using Netgraph would be much simpler.  Email me and I will let you
 into my CVS repo of the IrDA ongoing work that Benno and I have done.
 Benno is working hard on FreeBSD/PPC kernel porting.  I am doing the
 FreeBSD/PowerPC userland porting as well as I18N wchar* changes. 
 Both of us are swamped, and the IrDA work has stagnated.  I think we
 will gladly hand over the work. :)

Ok, that's fine with me, I am eager to see what progress you two have
made.

 | Following to that one I had another question:
 | 
 | 2. Is Netgraph going to be the future in FreeBSD network stacks. Iaw, will
 | tcp/ip be based on Netgraph in the future or will it just be a nice
 | extension but not more.
 
 Possibly, but why?   TCP/IP can be very resource intensive. After all,
 we have systems designed to only do TCP/IP, servers.  
 IrDA, at maximum performance, cannot be higher than ~4mbit/sec, compared
 to gigabit ethernet and ATM networks that FreeBSD supports. 
 At such high levels of I/O and CPU time, we can afford to have TCP/IP
 services in the kernel.  On the contrary, IrDA is ugly and should 
 be organized by Netgraph. 

*nods* That was the answer I expected, but wanted it to know for sure.

 | The reason I ask it is this: Is it wise to implement my protocol based on
 | Netgraph (so I can do it as a kernel module), or should I just build it
 | into the kernel?
 
 Netgraph all the way. (/me pondering what Julian is thinking)
 IrDA is a bunch of messed up ugly protocols that can simply be
 different ng_* Netgraph nodes.

I get the feeling I should use netgraph *grin*


 Do you have the IrDA ISA driver? If so, for what chipset? 
 Is yours the National Semiconductor Super IO chipsets?
 Can I see the IrDA ISA driver? :)

I've written the PCI IrDA driver for my Toshiba laptop, the OBOE chipset.
I am willing to write other drivers too, if someone can supply me with the
needed hardware to develop for.
One thing I will look at tonight is an old Tulip laptop I have laying
around somewhere. It has an infrared port, but I have no idea what
chipset.
My driver is strongly based on the OBOE driver from Linux, so porting the
other drivers should not be a big problem probably. (This one costed me
a bit more time because it was my first PCI driver)


Mark


-- 
Mark Santcroos RIPE Network Coordination Centre

PGP KeyID: 1024/0x3DCBEB8D 
PGP Fingerprint: BB1E D037 F29D 4B40 0B26  F152 795F FCAB 3DCB EB8D


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: [IrDA] was: adding an address family

2001-01-17 Thread Julian Elischer


You may also want to talk to:

  Roger Hardiman [EMAIL PROTECTED]

who expressed an interest in doing IrDA last June..

probably also worth puting out a general call for interested parties.


Mark Santcroos wrote:

Then just look at the drivers for various line cards
such as the if_sr.c
file and if_lmc.c

and check out the sample netgraph file,
ng_sample.c
and the sample device driver (share/examples/drivers/make_device_driver.sh)
(warning only up-to date in -current)

If you want to send me your driver I'll even make a first attempt to bolt a
netgraph interface to it.
(or you can try and I'll check it for you)

check the 'blueprints' article on netgraph in daemon-news
for a good run-down on what it all means (though it's abot out of date
and had a few small

lastly, read netgraph(4)

here is a list of existing netgraph drivers:

sys/dev/lmc/if_lmc.c sys/dev/usb/udbp.c sys/i386/isa/if_ar.c 
sys/i386/isa/if_sr.c sys/i4b/driver/i4b_ing.c sys/netgraph/ng_ether.c
sys/netgraph/ng_tty.c sys/pci/if_mn.c sys/dev/musycc/musycc.c

 
  Basically, we really do not want the Linux solution of doing IrDA.
  Using Netgraph would be much simpler.  Email me and I will let you
  into my CVS repo of the IrDA ongoing work that Benno and I have done.
  Benno is working hard on FreeBSD/PPC kernel porting.  I am doing the
  FreeBSD/PowerPC userland porting as well as I18N wchar* changes.
  Both of us are swamped, and the IrDA work has stagnated.  I think we
  will gladly hand over the work. :)
 
 Ok, that's fine with me, I am eager to see what progress you two have
 made.

me too actually. I was considering doing IRda last year and got all the docs.

 
  | Following to that one I had another question:
  |
  | 2. Is Netgraph going to be the future in FreeBSD network stacks. Iaw, will
  | tcp/ip be based on Netgraph in the future or will it just be a nice
  | extension but not more.

Netgraph is designed to co-exist with the exisiting network protocols.
It would add significant overhead to replace them.

 
  Possibly, but why?   TCP/IP can be very resource intensive. After all,
  we have systems designed to only do TCP/IP, servers.
  IrDA, at maximum performance, cannot be higher than ~4mbit/sec, compared
  to gigabit ethernet and ATM networks that FreeBSD supports.
  At such high levels of I/O and CPU time, we can afford to have TCP/IP
  services in the kernel.  On the contrary, IrDA is ugly and should
  be organized by Netgraph.

*Ugly* is an understatement.

 
 *nods* That was the answer I expected, but wanted it to know for sure.
 
  | The reason I ask it is this: Is it wise to implement my protocol based on
  | Netgraph (so I can do it as a kernel module), or should I just build it
  | into the kernel?
 
  Netgraph all the way. (/me pondering what Julian is thinking)

It's great having someone write my thoughts for me :-)

  IrDA is a bunch of messed up ugly protocols that can simply be
  different ng_* Netgraph nodes.
 
 I get the feeling I should use netgraph *grin*
 
  Do you have the IrDA ISA driver? If so, for what chipset?
  Is yours the National Semiconductor Super IO chipsets?
  Can I see the IrDA ISA driver? :)
 
 I've written the PCI IrDA driver for my Toshiba laptop, the OBOE chipset.
 I am willing to write other drivers too, if someone can supply me with the
 needed hardware to develop for.
 One thing I will look at tonight is an old Tulip laptop I have laying
 around somewhere. It has an infrared port, but I have no idea what
 chipset.

maybe just old async IR.. we should try handle that too :-)

 My driver is strongly based on the OBOE driver from Linux, so porting the
 other drivers should not be a big problem probably. (This one costed me
 a bit more time because it was my first PCI driver)

for a sample PCI driver do:
(on current)
cd /usr/share/examples/drivers
sh make_device_driver.sh irda
then examine the generated files..
:-)

 
 Mark
 
 --
 Mark Santcroos RIPE Network Coordination Centre
 
 PGP KeyID: 1024/0x3DCBEB8D
 PGP Fingerprint: BB1E D037 F29D 4B40 0B26  F152 795F FCAB 3DCB EB8D

-- 
  __--_|\  Julian Elischer
 /   \ [EMAIL PROTECTED]
(   OZ) World tour 2000
--- X_.---._/  from Perth, presently in:  Budapest
v


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



adding an address family

2001-01-16 Thread Mark Santcroos

Hi,

I wonder if it is possible to dynamicly add an address family from a
kernel module.

I ask this because I am working on IrDA support for FreeBSD. I want to
create AF_IRDA and all the corresponding structures and functions.

So would it be possible to add another network stack at runtime or is the
code not ready for that?

Thanks

Mark

-- 
Mark Santcroos RIPE Network Coordination Centre

PGP KeyID: 1024/0x3DCBEB8D 
PGP Fingerprint: BB1E D037 F29D 4B40 0B26  F152 795F FCAB 3DCB EB8D


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: adding an address family

2001-01-16 Thread Julian Elischer

Mark Santcroos wrote:
 
 Hi,
 
 I wonder if it is possible to dynamicly add an address family from a
 kernel module.
 
 I ask this because I am working on IrDA support for FreeBSD. I want to
 create AF_IRDA and all the corresponding structures and functions.
 
 So would it be possible to add another network stack at runtime or is the
 code not ready for that?


we do this in ng_socket.c where we add our own protocol.

we even export the number of the protocol and domain to userland with sysctls
so one COULD run a program which doesn't know in advance what the 
protocol and domain numbers are..


 
 Thanks
 
 Mark
 
 --
 Mark Santcroos RIPE Network Coordination Centre
 
 PGP KeyID: 1024/0x3DCBEB8D
 PGP Fingerprint: BB1E D037 F29D 4B40 0B26  F152 795F FCAB 3DCB EB8D
 
 To Unsubscribe: send mail to [EMAIL PROTECTED]
 with "unsubscribe freebsd-hackers" in the body of the message

-- 
  __--_|\  Julian Elischer
 /   \ [EMAIL PROTECTED]
(   OZ) World tour 2000
--- X_.---._/  from Perth, presently in:  Budapest
v


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: adding an address family

2001-01-16 Thread Mark Santcroos

On Tue, Jan 16, 2001 at 10:22:12AM -0800, Julian Elischer wrote:
  So would it be possible to add another network stack at runtime or is the
  code not ready for that?
 
 we do this in ng_socket.c where we add our own protocol.

Thanx,

I didn't thought on the netgraph code.

Is this likely going to replace all the implementations of the current
supported network protocols?

In other words, is netgraph the right way to go for me, or should I rather
focus on the more static part and drop the idea of implementing it as a
kernel module?

Mark

--
Mark Santcroos RIPE Network Coordination Centre

PGP KeyID: 1024/0x3DCBEB8D 
PGP Fingerprint: BB1E D037 F29D 4B40 0B26  F152 795F FCAB 3DCB EB8D


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: adding an address family

2001-01-16 Thread Julian Elischer

Mark Santcroos wrote:
 
 On Tue, Jan 16, 2001 at 10:22:12AM -0800, Julian Elischer wrote:
   So would it be possible to add another network stack at runtime or is the
   code not ready for that?
 
  we do this in ng_socket.c where we add our own protocol.
 
 Thanx,
 
 I didn't thought on the netgraph code.
 
 Is this likely going to replace all the implementations of the current
 supported network protocols?
 
 In other words, is netgraph the right way to go for me, or should I rather
 focus on the more static part and drop the idea of implementing it as a
 kernel module?

I don't know.. I don't know what you need :-)

I was just suggesting that we made a new loadable protocol in netgraph that you 
could use as an example. Of course it IS possible that you could do what you 
want using netgraph but since I don't know what that is, I can't judge.


 
 Mark
 
 --
 Mark Santcroos RIPE Network Coordination Centre
 
 PGP KeyID: 1024/0x3DCBEB8D
 PGP Fingerprint: BB1E D037 F29D 4B40 0B26  F152 795F FCAB 3DCB EB8D

-- 
  __--_|\  Julian Elischer
 /   \ [EMAIL PROTECTED]
(   OZ) World tour 2000
--- X_.---._/  from Perth, presently in:  Budapest
v


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: adding an address family

2001-01-16 Thread Mark Santcroos

On Tue, Jan 16, 2001 at 01:01:54PM -0800, Julian Elischer wrote:
  Is this likely going to replace all the implementations of the current
  supported network protocols?
  
  In other words, is netgraph the right way to go for me, or should I rather
  focus on the more static part and drop the idea of implementing it as a
  kernel module?
 
 I don't know.. I don't know what you need :-)
Hi,

Ok I'm trying to make a port of the IrDA stack on Linux to FreeBSD.
I've now written the driver for the chipset on my laptop, and I am ready
with that to pass data to an upper layer.

In Linux IrDA is handled as AF_IRDA, so in userland you create an AF_IRDA
socket just as you would do with a normal TCP/IP stack and then you can
commnunicate with other IrDA devices.

I had two questions:

1. How can I dynamicly implement a new network protocol as a kernel
module.
The answer for that one seems to be Netgraph

Following to that one I had another question:

2. Is Netgraph going to be the future in FreeBSD network stacks. Iaw, will
tcp/ip be based on Netgraph in the future or will it just be a nice
extension but not more.

The reason I ask it is this: Is it wise to implement my protocol based on
Netgraph (so I can do it as a kernel module), or should I just build it
into the kernel?

I know; A lot of questions, but I sure need the help :-)
(And wouldn't it be cool if we would have IrDA support?)

Mark

-- 
Mark Santcroos RIPE Network Coordination Centre

PGP KeyID: 1024/0x3DCBEB8D 
PGP Fingerprint: BB1E D037 F29D 4B40 0B26  F152 795F FCAB 3DCB EB8D


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message



Re: adding an address family

2001-01-16 Thread Michael C . Wu

[cc'ed to Benno for his fun and entertainment]

On Tue, Jan 16, 2001 at 11:23:26PM +0100, Mark Santcroos scribbled:
| On Tue, Jan 16, 2001 at 01:01:54PM -0800, Julian Elischer wrote:
|   Is this likely going to replace all the implementations of the current
|   supported network protocols?
|   
|   In other words, is netgraph the right way to go for me, or should I rather
|   focus on the more static part and drop the idea of implementing it as a
|   kernel module?
|  
| Ok I'm trying to make a port of the IrDA stack on Linux to FreeBSD.
| I've now written the driver for the chipset on my laptop, and I am ready
| with that to pass data to an upper layer. 

Basically, we really do not want the Linux solution of doing IrDA.
Using Netgraph would be much simpler.  Email me and I will let you
into my CVS repo of the IrDA ongoing work that Benno and I have done.
Benno is working hard on FreeBSD/PPC kernel porting.  I am doing the
FreeBSD/PowerPC userland porting as well as I18N wchar* changes. 
Both of us are swamped, and the IrDA work has stagnated.  I think we
will gladly hand over the work. :)

| In Linux IrDA is handled as AF_IRDA, so in userland you create an AF_IRDA
| socket just as you would do with a normal TCP/IP stack and then you can
| commnunicate with other IrDA devices.

This "layering" scheme, is what Netgraph does.

| I had two questions:
| 
| 1. How can I dynamicly implement a new network protocol as a kernel
| module.
| The answer for that one seems to be Netgraph

Netgraph ends all discussions. :)

| Following to that one I had another question:
| 
| 2. Is Netgraph going to be the future in FreeBSD network stacks. Iaw, will
| tcp/ip be based on Netgraph in the future or will it just be a nice
| extension but not more.

Possibly, but why?   TCP/IP can be very resource intensive. After all,
we have systems designed to only do TCP/IP, servers.  
IrDA, at maximum performance, cannot be higher than ~4mbit/sec, compared
to gigabit ethernet and ATM networks that FreeBSD supports. 
At such high levels of I/O and CPU time, we can afford to have TCP/IP
services in the kernel.  On the contrary, IrDA is ugly and should 
be organized by Netgraph. 

| The reason I ask it is this: Is it wise to implement my protocol based on
| Netgraph (so I can do it as a kernel module), or should I just build it
| into the kernel?

Netgraph all the way. (/me pondering what Julian is thinking)
IrDA is a bunch of messed up ugly protocols that can simply be
different ng_* Netgraph nodes.

| I know; A lot of questions, but I sure need the help :-)
| (And wouldn't it be cool if we would have IrDA support?)

Do you have the IrDA ISA driver? If so, for what chipset? 
Is yours the National Semiconductor Super IO chipsets?
Can I see the IrDA ISA driver? :)

-- 
+--+
| [EMAIL PROTECTED] | [EMAIL PROTECTED] |
| http://peorth.iteration.net/~keichii | Yes, BSD is a conspiracy. |
+--+


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message