isdn4linux-web/workshop/linklevel/isdn_net.h.shtml

136 lines
9.1 KiB
Plaintext

<HTML>
<!-- Generated by c2html-1.0, Copyright 1998 by Dave Whittington -->
<HEAD>
<TITLE>isdn_net.h</TITLE>
<!--#include virtual="/ssi/js.shtml" -->
<!--#include virtual="/ssi/buttondefs.shtml" -->
</HEAD>
<BODY BGCOLOR="#FFFFFF">
<TABLE WIDTH="100%">
<TR>
<TD ALIGN=LEFT WIDTH="90"><!--#include virtual="/ssi/b_home.shtml" --></TD>
<TD ALIGN=RIGHT WIDTH="90"><!--#include virtual="/ssi/b_index.shtml" --></TD>
</TR>
</TABLE>
<CENTER><H1>isdn_net.h</H1></CENTER>
<HR>
<PRE>
<FONT COLOR=#0000FF>/* $Id$
* header for Linux ISDN subsystem, network related functions (linklevel).
*
* Copyright 1994,95,96 by Fritz Elfert (fritz@wuemaus.franken.de)
* Copyright 1995,96 by Thinking Objects Software GmbH Wuerzburg
* Copyright 1995,96 by Michael Hipp (Michael.Hipp@student.uni-tuebingen.de)
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* $Log$
* Revision 1.6 1997/10/09 21:28:54 fritz
* New HL&lt;-&gt;LL interface:
* New BSENT callback with nr. of bytes included.
* Sending without ACK.
* New L1 error status (not yet in use).
* Cleaned up obsolete structures.
* Implemented Cisco-SLARP.
* Changed local net-interface data to be dynamically allocated.
* Removed old 2.0 compatibility stuff.
*
* Revision 1.5 1997/02/10 20:12:47 fritz
* Changed interface for reporting incoming calls.
*
* Revision 1.4 1997/02/03 23:16:48 fritz
* Removed isdn_net_receive_callback prototype.
*
* Revision 1.3 1997/01/17 01:19:30 fritz
* Applied chargeint patch.
*
* Revision 1.2 1996/04/20 16:29:43 fritz
* Misc. typos
*
* Revision 1.1 1996/02/11 02:35:13 fritz
* Initial revision
*
*/</FONT>
<FONT COLOR=#0000FF>/* Definitions for hupflags: */</FONT>
<FONT COLOR=#A521F7>#define</FONT> <A NAME="ISDN_WAITCHARGE">ISDN_WAITCHARGE</A> 1 <FONT COLOR=#0000FF>/* did not get a charge info yet */</FONT>
<FONT COLOR=#A521F7>#define</FONT> <A NAME="ISDN_HAVECHARGE">ISDN_HAVECHARGE</A> 2 <FONT COLOR=#0000FF>/* We know a charge info */</FONT>
<FONT COLOR=#A521F7>#define</FONT> <A NAME="ISDN_CHARGEHUP">ISDN_CHARGEHUP</A> 4 <FONT COLOR=#0000FF>/* We want to use the charge mechanism */</FONT>
<FONT COLOR=#A521F7>#define</FONT> <A NAME="ISDN_INHUP">ISDN_INHUP</A> 8 <FONT COLOR=#0000FF>/* Even if incoming, close after huptimeout */</FONT>
<FONT COLOR=#A521F7>#define</FONT> <A NAME="ISDN_MANCHARGE">ISDN_MANCHARGE</A> 16 <FONT COLOR=#0000FF>/* Charge Interval manually set */</FONT>
<FONT COLOR=#0000FF>/*
* Definitions for Cisco-HDLC header.
*/</FONT>
<FONT COLOR="#298C52">typedef</FONT> <FONT COLOR="#298C52">struct</FONT> <A NAME="cisco_hdr">cisco_hdr</A> {
__u8 addr; <FONT COLOR=#0000FF>/* unicast/broadcast */</FONT>
__u8 ctrl; <FONT COLOR=#0000FF>/* Always 0 */</FONT>
__u16 type; <FONT COLOR=#0000FF>/* IP-typefield */</FONT>
} <A HREF="#cisco_hdr">cisco_hdr</A>;
<FONT COLOR="#298C52">typedef</FONT> <FONT COLOR="#298C52">struct</FONT> <A NAME="cisco_slarp">cisco_slarp</A> {
__u32 code; <FONT COLOR=#0000FF>/* SLREQ/SLREPLY/KEEPALIVE */</FONT>
<FONT COLOR="#298C52">union</FONT> {
<FONT COLOR="#298C52">struct</FONT> {
__u32 ifaddr; <FONT COLOR=#0000FF>/* My interface address */</FONT>
__u32 netmask; <FONT COLOR=#0000FF>/* My interface netmask */</FONT>
} reply;
<FONT COLOR="#298C52">struct</FONT> {
__u32 my_seq; <FONT COLOR=#0000FF>/* Packet sequence number */</FONT>
__u32 your_seq;
} keepalive;
} slarp;
__u16 rel; <FONT COLOR=#0000FF>/* Always 0xffff */</FONT>
__u16 t1; <FONT COLOR=#0000FF>/* Uptime in usec &gt;&gt; 16 */</FONT>
__u16 t0; <FONT COLOR=#0000FF>/* Uptime in usec &amp; 0xffff */</FONT>
} <A HREF="#cisco_slarp">cisco_slarp</A>;
<FONT COLOR=#A521F7>#define</FONT> <A NAME="CISCO_ADDR_UNICAST">CISCO_ADDR_UNICAST</A> 0x0f
<FONT COLOR=#A521F7>#define</FONT> <A NAME="CISCO_ADDR_BROADCAST">CISCO_ADDR_BROADCAST</A> 0x8f
<FONT COLOR=#A521F7>#define</FONT> <A NAME="CISCO_TYPE_INET">CISCO_TYPE_INET</A> 0x0800
<FONT COLOR=#A521F7>#define</FONT> <A NAME="CISCO_TYPE_SLARP">CISCO_TYPE_SLARP</A> 0x8035
<FONT COLOR=#A521F7>#define</FONT> <A NAME="CISCO_SLARP_REPLY">CISCO_SLARP_REPLY</A> 0
<FONT COLOR=#A521F7>#define</FONT> <A NAME="CISCO_SLARP_REQUEST">CISCO_SLARP_REQUEST</A> 1
<FONT COLOR=#A521F7>#define</FONT> <A NAME="CISCO_SLARP_KEEPALIVE">CISCO_SLARP_KEEPALIVE</A> 2
<FONT COLOR="#298C52">extern</FONT> <FONT COLOR="#298C52">char</FONT> *<A HREF="isdn_net.c.shtml#isdn_net_new">isdn_net_new</A>(<FONT COLOR="#298C52">char</FONT> *, <FONT COLOR="#298C52">struct</FONT> device *);
<FONT COLOR="#298C52">extern</FONT> <FONT COLOR="#298C52">char</FONT> *<A HREF="isdn_net.c.shtml#isdn_net_newslave">isdn_net_newslave</A>(<FONT COLOR="#298C52">char</FONT> *);
<FONT COLOR="#298C52">extern</FONT> <FONT COLOR="#298C52">int</FONT> <A HREF="isdn_net.c.shtml#isdn_net_rm">isdn_net_rm</A>(<FONT COLOR="#298C52">char</FONT> *);
<FONT COLOR="#298C52">extern</FONT> <FONT COLOR="#298C52">int</FONT> <A HREF="isdn_net.c.shtml#isdn_net_rmall">isdn_net_rmall</A>(<FONT COLOR="#298C52">void</FONT>);
<FONT COLOR="#298C52">extern</FONT> <FONT COLOR="#298C52">int</FONT> <A HREF="isdn_net.c.shtml#isdn_net_stat_callback">isdn_net_stat_callback</A>(<FONT COLOR="#298C52">int</FONT>, <A HREF="../includes/isdnif.h.shtml#isdn_ctrl">isdn_ctrl</A> *);
<FONT COLOR="#298C52">extern</FONT> <FONT COLOR="#298C52">int</FONT> <A HREF="isdn_net.c.shtml#isdn_net_setcfg">isdn_net_setcfg</A>(<A HREF="../includes/isdn.h.shtml#isdn_net_ioctl_cfg">isdn_net_ioctl_cfg</A> *);
<FONT COLOR="#298C52">extern</FONT> <FONT COLOR="#298C52">int</FONT> <A HREF="isdn_net.c.shtml#isdn_net_getcfg">isdn_net_getcfg</A>(<A HREF="../includes/isdn.h.shtml#isdn_net_ioctl_cfg">isdn_net_ioctl_cfg</A> *);
<FONT COLOR="#298C52">extern</FONT> <FONT COLOR="#298C52">int</FONT> <A HREF="isdn_net.c.shtml#isdn_net_addphone">isdn_net_addphone</A>(<A HREF="../includes/isdn.h.shtml#isdn_net_ioctl_phone">isdn_net_ioctl_phone</A> *);
<FONT COLOR="#298C52">extern</FONT> <FONT COLOR="#298C52">int</FONT> <A HREF="isdn_net.c.shtml#isdn_net_getphones">isdn_net_getphones</A>(<A HREF="../includes/isdn.h.shtml#isdn_net_ioctl_phone">isdn_net_ioctl_phone</A> *, <FONT COLOR="#298C52">char</FONT> *);
<FONT COLOR="#298C52">extern</FONT> <FONT COLOR="#298C52">int</FONT> <A HREF="isdn_net.c.shtml#isdn_net_delphone">isdn_net_delphone</A>(<A HREF="../includes/isdn.h.shtml#isdn_net_ioctl_phone">isdn_net_ioctl_phone</A> *);
<FONT COLOR="#298C52">extern</FONT> <FONT COLOR="#298C52">int</FONT> <A HREF="isdn_net.c.shtml#isdn_net_find_icall">isdn_net_find_icall</A>(<FONT COLOR="#298C52">int</FONT>, <FONT COLOR="#298C52">int</FONT>, <FONT COLOR="#298C52">int</FONT>, <A HREF="../includes/isdnif.h.shtml#setup_parm">setup_parm</A>);
<FONT COLOR="#298C52">extern</FONT> <FONT COLOR="#298C52">void</FONT> <A HREF="isdn_net.c.shtml#isdn_net_hangup">isdn_net_hangup</A>(<FONT COLOR="#298C52">struct</FONT> device *);
<FONT COLOR="#298C52">extern</FONT> <FONT COLOR="#298C52">void</FONT> <A HREF="isdn_net.c.shtml#isdn_net_dial">isdn_net_dial</A>(<FONT COLOR="#298C52">void</FONT>);
<FONT COLOR="#298C52">extern</FONT> <FONT COLOR="#298C52">void</FONT> <A HREF="isdn_net.c.shtml#isdn_net_autohup">isdn_net_autohup</A>(<FONT COLOR="#298C52">void</FONT>);
<FONT COLOR="#298C52">extern</FONT> <FONT COLOR="#298C52">int</FONT> <A HREF="isdn_net.c.shtml#isdn_net_force_hangup">isdn_net_force_hangup</A>(<FONT COLOR="#298C52">char</FONT> *);
<FONT COLOR="#298C52">extern</FONT> <FONT COLOR="#298C52">int</FONT> <A HREF="isdn_net.c.shtml#isdn_net_force_dial">isdn_net_force_dial</A>(<FONT COLOR="#298C52">char</FONT> *);
<FONT COLOR="#298C52">extern</FONT> <A HREF="../includes/isdn.h.shtml#isdn_net_dev">isdn_net_dev</A> *<A HREF="isdn_net.c.shtml#isdn_net_findif">isdn_net_findif</A>(<FONT COLOR="#298C52">char</FONT> *);
<FONT COLOR="#298C52">extern</FONT> <FONT COLOR="#298C52">int</FONT> <A HREF="isdn_net.c.shtml#isdn_net_send_skb">isdn_net_send_skb</A>(<FONT COLOR="#298C52">struct</FONT> device *, isdn_net_local *,
<FONT COLOR="#298C52">struct</FONT> sk_buff *);
<FONT COLOR="#298C52">extern</FONT> <FONT COLOR="#298C52">int</FONT> <A HREF="isdn_net.c.shtml#isdn_net_rcv_skb">isdn_net_rcv_skb</A>(<FONT COLOR="#298C52">int</FONT>, <FONT COLOR="#298C52">struct</FONT> sk_buff *);
<FONT COLOR="#298C52">extern</FONT> <FONT COLOR="#298C52">void</FONT> <A HREF="isdn_net.c.shtml#isdn_net_slarp_out">isdn_net_slarp_out</A>(<FONT COLOR="#298C52">void</FONT>);
</BODY>
</HTML>