All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 2.6] convert netrom to module_param
@ 2004-07-29 18:36 Stephen Hemminger
  2004-07-29 23:02 ` David S. Miller
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Stephen Hemminger @ 2004-07-29 18:36 UTC (permalink / raw)
  To: David S. Miller, Ralf Baechel; +Cc: netdev, linux-hams

Convert Netrom to use module_param

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
 
diff -Nru a/net/netrom/af_netrom.c b/net/netrom/af_netrom.c
--- a/net/netrom/af_netrom.c	2004-07-23 13:27:52 -07:00
+++ b/net/netrom/af_netrom.c	2004-07-23 13:27:52 -07:00
@@ -10,6 +10,7 @@
  */
 #include <linux/config.h>
 #include <linux/module.h>
+#include <linux/moduleparam.h>
 #include <linux/errno.h>
 #include <linux/types.h>
 #include <linux/socket.h>
@@ -1451,8 +1452,7 @@
 
 module_init(nr_proto_init);
 
-
-MODULE_PARM(nr_ndevs, "i");
+module_param(nr_ndevs, int, 0);
 MODULE_PARM_DESC(nr_ndevs, "number of NET/ROM devices");
 
 MODULE_AUTHOR("Jonathan Naylor G4KLX <g4klx@g4klx.demon.co.uk>");


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 2.6] convert netrom to module_param
  2004-07-29 18:36 [PATCH 2.6] convert netrom to module_param Stephen Hemminger
@ 2004-07-29 23:02 ` David S. Miller
  2004-11-02 16:48 ` mkiss, udev and kernel 2.6 Bernard Pidoux
  2004-11-02 17:34 ` xfbb ports and kernel 2.6.8 Bernard Pidoux
  2 siblings, 0 replies; 8+ messages in thread
From: David S. Miller @ 2004-07-29 23:02 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: ralf, netdev, linux-hams

On Thu, 29 Jul 2004 11:36:51 -0700
Stephen Hemminger <shemminger@osdl.org> wrote:

> Convert Netrom to use module_param

Also applied, thanks.


^ permalink raw reply	[flat|nested] 8+ messages in thread

* mkiss, udev and kernel 2.6
  2004-07-29 18:36 [PATCH 2.6] convert netrom to module_param Stephen Hemminger
  2004-07-29 23:02 ` David S. Miller
@ 2004-11-02 16:48 ` Bernard Pidoux
  2004-11-12  0:56   ` AA6QN
  2004-11-02 17:34 ` xfbb ports and kernel 2.6.8 Bernard Pidoux
  2 siblings, 1 reply; 8+ messages in thread
From: Bernard Pidoux @ 2004-11-02 16:48 UTC (permalink / raw)
  Cc: linux-hams

Hi,

Does someone have an experience with mkiss and udev in 2.6 kernel ?

I need to use mkiss-kissattach to drive a dual port TNC 1200/9600 KPC9612.

However I don't see how to set up a master-slave pseudo tty system with 
udev.

Actually, I went through by instructing the kernel to load devfs at boot 
(append="devfs=mount... " in lilo.conf.

But Is there any other solution with udev alone (without devfs) ?

73 de Bernard, f6bvp

^ permalink raw reply	[flat|nested] 8+ messages in thread

* xfbb ports and kernel 2.6.8
  2004-07-29 18:36 [PATCH 2.6] convert netrom to module_param Stephen Hemminger
  2004-07-29 23:02 ` David S. Miller
  2004-11-02 16:48 ` mkiss, udev and kernel 2.6 Bernard Pidoux
@ 2004-11-02 17:34 ` Bernard Pidoux
  2 siblings, 0 replies; 8+ messages in thread
From: Bernard Pidoux @ 2004-11-02 17:34 UTC (permalink / raw)
  Cc: linux-hams

Hi,

I have a problem when configuring AX25 ports with xfbbd BBS under 2.6 
kernel.

I applied successfully Jeroen Vreeken's (pe1rxq@amsat.org) following 
patch for xfbbd BBS running on 2.6 kernel.
http://he.fi/archive/linux-hams/200402/att-0037/01-fbb703.linux2.6.diff

I can log on through the console but the BBS does not recognize nor 
communicate with other ports than ax0 (although I have declared 3 serial 
ports ax0, ax1 and ax3 in port.sys) except TELNET port that is 
functional at receiving forwarding.

In port.sys I was using with 2.2.25, ports were declared

1 9 ax0 38400
2 9 ax1 38400
3 9 ax3 38400
4 9 189C 0

Is there any specificity for declaring FBB ports with 2.6 kernel ?

73 de Bernard, f6bvp


^ permalink raw reply	[flat|nested] 8+ messages in thread

* RE: mkiss, udev and kernel 2.6
  2004-11-02 16:48 ` mkiss, udev and kernel 2.6 Bernard Pidoux
@ 2004-11-12  0:56   ` AA6QN
  2004-11-12  4:59     ` Jeremy Utley
  2005-03-13 23:25     ` Bernard Pidoux
  0 siblings, 2 replies; 8+ messages in thread
From: AA6QN @ 2004-11-12  0:56 UTC (permalink / raw)
  To: 'Bernard Pidoux'; +Cc: linux-hams

I ported my Linux over to Gentoo and started off with devfs. I did try udev
and it did not work for me. So, back to devfs and things are working once
again. Let us know if you get it running.

73,John AA6QN

-----Original Message-----
From: linux-hams-owner@vger.kernel.org
[mailto:linux-hams-owner@vger.kernel.org] On Behalf Of Bernard Pidoux
Sent: Tuesday, November 02, 2004 8:49 AM
To: unlisted-recipients:; no To-header on input
Cc: linux-hams@vger.kernel.org
Subject: mkiss, udev and kernel 2.6

Hi,

Does someone have an experience with mkiss and udev in 2.6 kernel ?

I need to use mkiss-kissattach to drive a dual port TNC 1200/9600 KPC9612.

However I don't see how to set up a master-slave pseudo tty system with 
udev.

Actually, I went through by instructing the kernel to load devfs at boot 
(append="devfs=mount... " in lilo.conf.

But Is there any other solution with udev alone (without devfs) ?

73 de Bernard, f6bvp
-
To unsubscribe from this list: send the line "unsubscribe linux-hams" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: mkiss, udev and kernel 2.6
  2004-11-12  0:56   ` AA6QN
@ 2004-11-12  4:59     ` Jeremy Utley
  2005-03-13 23:25     ` Bernard Pidoux
  1 sibling, 0 replies; 8+ messages in thread
From: Jeremy Utley @ 2004-11-12  4:59 UTC (permalink / raw)
  To: linux-hams

As I said in my original message to Bernard, it's not a hard thing. 
First, you have to make sure that BSD PTY support is in your kernel. 
Then, in your bootscripts, before you run the mkiss command to set up
the dual port TNC, create the 4 legacy PTY nodes into the /dev
filesystem.  You can find the correct major/minor numbers to use by
looking at devices.txt in the kernel source Doucmentation directory,
or looking at an old distro that has them set up already.  You'll need
4 device nodes:

/dev/ptyp0 - character device, major number 2, minor number 0
/dev/ptyp1 - character device, major number 2, minor number 1
/dev/ttyp0 - character device, major 3, minor 0
/dev/ttyp1 - character device, major 3, minor 1

Then, your mkiss command will look something like this:

mkiss -s 9600 /dev/ttyS0 /dev/ptyp0 /dev/ptyp1

and your kissattach commands will reference /dev/ttyp0 and /dev/ttyp1.
 On my Kam, when configured this way, /dev/ttyp0 ends up the VHF port,
and /dev/ttyp1 the HF port.

Hope this helps!

Jeremy, NW7JU (ex KF3EL)


On Thu, 11 Nov 2004 16:56:40 -0800, AA6QN <aa6qn@pacbell.net> wrote:
> I ported my Linux over to Gentoo and started off with devfs. I did try udev
> and it did not work for me. So, back to devfs and things are working once
> again. Let us know if you get it running.
> 
> 73,John AA6QN
> 
> 
> 
> -----Original Message-----
> From: linux-hams-owner@vger.kernel.org
> [mailto:linux-hams-owner@vger.kernel.org] On Behalf Of Bernard Pidoux
> Sent: Tuesday, November 02, 2004 8:49 AM
> To: unlisted-recipients:; no To-header on input
> Cc: linux-hams@vger.kernel.org
> Subject: mkiss, udev and kernel 2.6
> 
> Hi,
> 
> Does someone have an experience with mkiss and udev in 2.6 kernel ?
> 
> I need to use mkiss-kissattach to drive a dual port TNC 1200/9600 KPC9612.
> 
> However I don't see how to set up a master-slave pseudo tty system with
> udev.
> 
> Actually, I went through by instructing the kernel to load devfs at boot
> (append="devfs=mount... " in lilo.conf.
> 
> But Is there any other solution with udev alone (without devfs) ?
> 
> 73 de Bernard, f6bvp
> -
> To unsubscribe from this list: send the line "unsubscribe linux-hams" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 
> -
> To unsubscribe from this list: send the line "unsubscribe linux-hams" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: mkiss, udev and kernel 2.6
  2004-11-12  0:56   ` AA6QN
  2004-11-12  4:59     ` Jeremy Utley
@ 2005-03-13 23:25     ` Bernard Pidoux
  2005-03-20 23:38       ` AX25 udev pseudo tty support Bernard Pidoux
  1 sibling, 1 reply; 8+ messages in thread
From: Bernard Pidoux @ 2005-03-13 23:25 UTC (permalink / raw)
  To: AA6QN; +Cc: linux-hams

Hi,

It took me a while but I succeeded in adding Unix98 pseudo tty master 
/dev/ptmx and slave /dev/pts/X into mkiss, kissattach and ax25ipd.

It was not so easy. Not for a lack of documentation, but because there 
was not much sample code. So, I had to make a lot of tries and errors.

However the principle is very simple. When one opens a master pseudo 
tty, the system automatically creates a slave pseudo tty.

This makes a pseudo tty couple that can be used like a tunnel. Every 
character written on the master tty side is presented to the slave tty 
and vice versa.

As, devfs is becoming obsolete with 2.6 kernel, udev support is needed 
for AX25. However, the additional code is backward compatible and I am 
also using it with 2.2.25 kernel.

As an example, here is a very simple rc.radio script I am using for 
initialisation of AX25 on my 2.6 kernel machine :

#!/bin/sh
echo 1 > /proc/sys/net/ipv4/ip_forward
/sbin/modprobe ax25
/sbin/modprobe rose
/sbin/modprobe mkiss
/bin/sleep 4
/usr/local/sbin/mkiss -s 38400 -l /dev/ttyS0 /dev/ptmx /dev/ptmx
/bin/sleep 4
/usr/local/sbin/kissattach -l /dev/pts/0   0   44.151.75.150
/usr/local/sbin/kissattach -l /dev/pts/1   1   44.151.75.150
/usr/local/sbin/kissattach -l -m 256 /dev/ptmx   2   44.151.75.150
/bin/sleep 4
/usr/local/sbin/ax25ipd -l4
/bin/sleep 4
/usr/local/sbin/fpac/fpac.sh
/bin/sleep 4
/usr/local/sbin/dxnet/dxnet.sh &
/bin/sleep 4
/usr/local/sbin/mheardd

This script initializes two radio ports 0 and 1 on a
KPC9612 dual port TNC connected to single computer serial port.

mkiss will make an interconnexion between a serial device carrying AX25 
packets (from a TNC) and a master pseudo terminal.
kissattach will connect the slave pseudo terminal side to an AX25 port 
on which Linux software can write or read characters.

In the third case, kissattach opens a master /dev/ptmx that in turn 
creates another /dev/pts/X device. This slave pseudo tty is then opened 
by ax25ipd.
ax25ipd will connect the AXIP port (port 2 in /etc/axports) to UDP port 
10093 for ROSE/FPAC Internet connexions (as declared in /etc/ax25ipd.conf).
Thus, AX25 programs can write or read characters on an AX25 port. They 
are assembled into an AX25 packet that is then encapsulated into IP 
frames that goes over the Internet to reach another AX25 talking station.

I don't know to whom I should submit the sources, for ax25-tools-0.0.8 
and ax25-apps-0.0.6 seem to be unchanged for months.

So, for anybody wanting to share the files, sources can be found here :

http://f6bvp.free.fr/logiciels/Pseudo-TTY/

io.c is from ax25-apps-0.0.6/ax25ipd/
mkiss.c and kissattach.c are from ax25-tools-0.0.8/kiss/


73 de Bernard, f6bvp

-----------

AA6QN wrote:
> I ported my Linux over to Gentoo and started off with devfs. I did try udev
> and it did not work for me. So, back to devfs and things are working once
> again. Let us know if you get it running.
> 
> 73,John AA6QN
> 
> -----Original Message-----
> From: linux-hams-owner@vger.kernel.org
> [mailto:linux-hams-owner@vger.kernel.org] On Behalf Of Bernard Pidoux
> Sent: Tuesday, November 02, 2004 8:49 AM
> To: unlisted-recipients:; no To-header on input
> Cc: linux-hams@vger.kernel.org
> Subject: mkiss, udev and kernel 2.6
> 
> Hi,
> 
> Does someone have an experience with mkiss and udev in 2.6 kernel ?
> 
> I need to use mkiss-kissattach to drive a dual port TNC 1200/9600 KPC9612.
> 
> However I don't see how to set up a master-slave pseudo tty system with 
> udev.
> 
> Actually, I went through by instructing the kernel to load devfs at boot 
> (append="devfs=mount... " in lilo.conf.
> 
> But Is there any other solution with udev alone (without devfs) ?
> 
> 73 de Bernard, f6bvp


^ permalink raw reply	[flat|nested] 8+ messages in thread

* AX25 udev pseudo tty support
  2005-03-13 23:25     ` Bernard Pidoux
@ 2005-03-20 23:38       ` Bernard Pidoux
  0 siblings, 0 replies; 8+ messages in thread
From: Bernard Pidoux @ 2005-03-20 23:38 UTC (permalink / raw)
  Cc: linux-hams, List for LINUX ROSE/FPAC network switch

Hi,

I have simplified usage of AX25 udev support by mkiss, kissattach and 
ax25ipd applications and tools for AX25.

There is no more need to specify full slave pseudo tty device names.
kissattach command line now only refers to /dev/pts, and the program 
will find itself the slave pseudo tty related to the master.
The same for ax25ipd in ax25ipd.conf.

Please have a look at the following script including some comments.
If you need help or have any questions, please do not hesitate to mail me.

Of course, my modifications are backward compatible with previous
usage of devfs pseudo ttys (which is much more complicated).

I have checked that it works with kernels 2.2.26 and 2.6.11.


  #!/bin/sh
  #
  # This is a sample script to demonstrate the use of udev
  # Unix98 master-slave pseudo tty device pairs for AX25
  # on Linux kernel = and > 2.2.
  #
  # Udev system usage is much more simple than former devfs.
  # There is a unique master pseudo tty, and a corresponding
  # slave pseudo tty is automatically created when opening
  # the master tty. Both are tunneled.
  #
  # AX25 ports 0 and 1 are declared in /etc/ax25/axport file
  #
  # In file /etc/ax25/ax25ipd.conf is declared a slave pseudo tty
  # device /dev/pts
  # to make a tunnel link with master /dev/ptmx opened by the
  # command line kissattach /dev/ptmx
  #
  # The following files have been modified to accept
  # /dev/ptmx - /dev/pts request :
  # ax25-apps-0.0.6/ax25ipd/io.c
  # ax25-tools-0.0.8/kiss/mkiss.c and kissattach.c
  #
  # The patched files can be downloaded from :
  # http://f6bvp.free.fr/logiciels/Unix98-pseudo-tty/
  #
  # Bernard Pidoux f6bvp@amsat.org
  #
  echo 1 > /proc/sys/net/ipv4/ip_forward
  # load ax25 packet radio, rose and mkiss modules
  /sbin/modprobe ax25
  /sbin/modprobe rose
  /sbin/modprobe mkiss
  /bin/sleep 4
  # mkiss opens two master pseudo ttys connected to serial port ttyS0
  /usr/local/sbin/mkiss -s 38400 -l /dev/ttyS0 /dev/ptmx /dev/ptmx
  /bin/sleep 4
  # kissattach links a slave pseudo tty to ax25 port 0
  /usr/local/sbin/kissattach /dev/pts 0 44.151.75.150
  # kissattach links a second slave pseudo tty to ax25 port 1
  /usr/local/sbin/kissattach /dev/pts 1 44.151.75.150
  # kissattach attachs a master pseudo tty to ax25 port 2
  # and creates a slave tty, making a tunnel between them
  /usr/local/sbin/kissattach -l -m 256 /dev/ptmx 2 44.151.75.150
  /bin/sleep 4
  # ax25ipd links slave pseudo tty to UDP port declared in ax25ipd.conf
  /usr/local/sbin/ax25ipd -l4
  /bin/sleep 4
  # start ROSE / FPAC AX25 level 3 packet switch application
  /usr/local/sbin/fpac/fpac.sh
  /bin/sleep 4
  # starts Dx cluster application using level 3 ROSE/FPAC routing
  /usr/local/sbin/dxnet/dxnet.sh &
  /bin/sleep 4
  # start mheardd daemon
  /usr/local/sbin/mheardd
  #


73 de Bernard, f6bvp.

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2005-03-20 23:38 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-07-29 18:36 [PATCH 2.6] convert netrom to module_param Stephen Hemminger
2004-07-29 23:02 ` David S. Miller
2004-11-02 16:48 ` mkiss, udev and kernel 2.6 Bernard Pidoux
2004-11-12  0:56   ` AA6QN
2004-11-12  4:59     ` Jeremy Utley
2005-03-13 23:25     ` Bernard Pidoux
2005-03-20 23:38       ` AX25 udev pseudo tty support Bernard Pidoux
2004-11-02 17:34 ` xfbb ports and kernel 2.6.8 Bernard Pidoux

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.