From: Tomi Manninen OH2BNS (gwrtwwu@mail.dy.fi)
Date: Tue Dec 03 2002 - 11:55:49 EET
On Tue, 3 Dec 2002, ozgun erdogan wrote:
> I read the kissattach code as I need to write some code which binds a TCP
> port to an ax network device. That is, TCP packets coming from a specific
> port will be read from ax1. (with listen for example.)
I think you have to be a bit more specific about what you are trying to
do. TCP is a transport layer protocol and TCP ports are a concept related
to TCP, of course. A network device is quite a few steps below that in the
OSI model (assuming for a minute that OSI model can be used to describe
the Linux networking stack). Binding a TCP port to an ax or whatever
network device doesn't really make much sense, to me anyway.
You mention the "listen" program. Could whatever you are doing be done
simply by modifying "listen" ?
> So, could you make any comments on how struct ifreq is used, or the way the
> KISS device is created? (also a link to some documentation would be very
> useful)
The essential thing in kissattach is the ioctl(..., TIOCSETD, ...) call.
That tells the kernel to switch the serial port to a special networking
mode (it sets a "line discipline" to it). The kernel then magically
creates the network device for you. The rest of kissattach is mostly
setting up some parameters like HW address, IP address etc. While these
are of course important, the real work is done in that ioctl() call.
-- Tomi Manninen Internet: tybs.polvqff@relay.tunkki.fi OH2BNS AX.25: lpdma.odnzfddcp@baglobal.net KP20ME04 Amprnet: rjhv@comhem.com- To unsubscribe from this list: send the line "unsubscribe linux-hams" in the body of a message to zghduf@fiengroup.com More majordomo info at http://vger.kernel.org/majordomo-info.html
This archive was generated by hypermail 2b30 : Tue Dec 03 2002 - 12:20:38 EET