diff options
author | bz <bz@FreeBSD.org> | 2008-05-26 10:40:09 +0000 |
---|---|---|
committer | bz <bz@FreeBSD.org> | 2008-05-26 10:40:09 +0000 |
commit | 6bba9b42448c966b4d7425ab0ca6f86f26564fb5 (patch) | |
tree | ce6d26c22aa5ab44c23fab794efd22c6b5bc9c39 /share/examples | |
parent | cf7fbdd9301f7a93d32de3e79370507fa46278c6 (diff) | |
download | FreeBSD-src-6bba9b42448c966b4d7425ab0ca6f86f26564fb5.zip FreeBSD-src-6bba9b42448c966b4d7425ab0ca6f86f26564fb5.tar.gz |
Remove ISDN4BSD (I4B) from HEAD as it is not MPSAFE and
parts relied on the now removed NET_NEEDS_GIANT.
Most of I4B has been disconnected from the build
since July 2007 in HEAD/RELENG_7.
This is what was removed:
- configuration in /etc/isdn
- examples
- man pages
- kernel configuration
- sys/i4b (drivers, layers, include files)
- user space tools
- i4b support from ppp
- further documentation
Discussed with: rwatson, re
Diffstat (limited to 'share/examples')
33 files changed, 0 insertions, 5487 deletions
diff --git a/share/examples/Makefile b/share/examples/Makefile index 6e1fb70..b5e2ab3 100644 --- a/share/examples/Makefile +++ b/share/examples/Makefile @@ -15,7 +15,6 @@ LDIRS= BSD_daemon \ find_interface \ ibcs2 \ ipfw \ - isdn \ kld \ libvgl \ mdoc \ @@ -77,35 +76,6 @@ XFILES= BSD_daemon/FreeBSD.pfa \ ibcs2/README \ ibcs2/hello.uu \ ipfw/change_rules.sh \ - isdn/FAQ \ - isdn/KERNEL \ - isdn/Overview \ - isdn/README \ - isdn/ROADMAP \ - isdn/ReleaseNotes \ - isdn/Resources \ - isdn/SupportedCards \ - isdn/ThankYou \ - isdn/contrib/README \ - isdn/contrib/anleitung.ppp \ - isdn/contrib/answer.c \ - isdn/contrib/answer.sh \ - isdn/contrib/convert.sh \ - isdn/contrib/hplay.c \ - isdn/contrib/i4b-ppp-newbie.txt \ - isdn/contrib/isdnctl \ - isdn/contrib/isdnd_acct \ - isdn/contrib/isdnd_acct.pl \ - isdn/contrib/isdntelmux.c \ - isdn/contrib/mrtg-isp0.sh \ - isdn/i4brunppp/Makefile \ - isdn/i4brunppp/README \ - isdn/i4brunppp/i4brunppp-isdnd.rc \ - isdn/i4brunppp/i4brunppp.8 \ - isdn/i4brunppp/i4brunppp.c \ - isdn/v21/Makefile \ - isdn/v21/README \ - isdn/v21/v21modem.c \ kld/Makefile \ kld/cdev/Makefile \ kld/cdev/README \ @@ -146,9 +116,7 @@ XFILES= BSD_daemon/FreeBSD.pfa \ ppi/Makefile \ ppi/ppilcd.c \ ppp/chap-auth \ - ppp/isdnd.rc \ ppp/login-auth \ - ppp/ppp.conf.isdn \ ppp/ppp.conf.sample \ ppp/ppp.conf.span-isp \ ppp/ppp.conf.span-isp.working \ diff --git a/share/examples/isdn/FAQ b/share/examples/isdn/FAQ deleted file mode 100644 index f3a4fda..0000000 --- a/share/examples/isdn/FAQ +++ /dev/null @@ -1,1079 +0,0 @@ -------------------------------------------------------------------------------- - - ISDN4BSD Frequently Asked Questions - =================================== - - last edit-date: [Wed Nov 1 15:08:03 2000] - - $FreeBSD$ - --------------------------------------------------------------------------------- - -Contents: -========= - - 1. How do I get started with synchronous PPP (sPPP) ? - 2. does anyone know a software that can receive/send fax over ISDN ? - 3. does i4b callback only work with setups where the remote end - returns a busy ? - 4. trouble with kernel options IPFIREWALL and IPDIVERT and natd - 5. I want to use -r with isdnd but it does not work - 6. How do I configure and run the answering machine ? - 7. Teles S0/16.3 ... unknown ? - 8. How do i integrate a new lowlevel driver into i4b ? - 9. Why it always says "no Space in TX FIFO - State F4 awaiting" ? - 10. Incoming alert - what does it mean ? - 11. How do i change irq's on my teles 16.3 card ? - 12. NL: i'm getting CAUSE 100 or CAUSE 101 when dialling out - 14. I'm using sPPP. I can connect to my ISP but no TCP/IP services work. HELP! - 15. i4b 0.80.00: problems with AVM Fritz PCI - 16. How do i setup logfile rotation for isdnd ? - 17. How do i setup dialin from Windows NT RAS to i4b ? - 18. How can I convert my old .g711a files to the new format? - 19. I have lots of old .g711a files to convert what can I do? - 20. How can I convert the .al files to Sun/NeXT .au/.snd/.vox files? - 21. Help, isdn4bsd 0.82 fails to probe my Elsa PCC-16! - 22. How do i enable and configure userland PPP with i4b ? - 23. What is the procedure to install a new i4b on FreeBSD 3.x ? - 24. Why do i get "ifconfig: ioctl (SIOCAIFADDR): file exists" ? - 25. How to properly operate isdnd's fullscreen output in a 132x60 vty - 26. NetBSD: i see isic0 while booting but I cannot access my Fritz!Card - 27. i4b_pci_attach: pci_map_port 1 failed! What does this mean ? - 28. What is: i4b-L2 i4b_rxd_ack: ((N(R)-1)=35) != (UA=36) !!! - 29. Why does isdnd take up 95% CPU time ? - - -1. How do I get started with synchronous PPP (sPPP) ? -================================================================================ - - Of course you first have to have sPPP interfaces in your kernel. If - you installed everything using FreeBSD/install.sh then the correct - entries should have been automatically made in /sys/conf/files for you. - For NetBSD it isn't quite as simple since NetBSD/install-netbsd.sh does - not do it for you. - - Then all you need to do is put an entry like this: - - device "i4bisppp" 4 - - into your kernel configuration file (if it's not already there) and - generate and boot the new kernel. The above line will give you 4 - sPPP interfaces - isp0 to isp3. - - Then just modify /etc/isdn/isdnd.rc (see the example in etc-isdn/isdnd.rc) - to suit your needs (telephone numbers, etc). - - The next step is to read the ispppcontrol man page and then to look at - etc/rc.isdn-PPP. ispppcontrol is a very important component in getting - sPPP working correctly and the ispppcontrol lines in your /etc/rc.isdn - must be correct. - - In my experience there are two things which can cause problems: - - 1) the authproto line has to agree with what your ISP desires. In - general I've found that it's best to have something like this - - - ispppcontrol <interface> myauthproto={pap,chap} myauthname=<AuthName> - myauthsecret=<AuthSecret> hisauthproto=none callin - - The "hisauthproto=none" is usually needed because the ISP does not want - to authorise himself to you; he expects you to authorize yourself to him ! - I once forgot to set hisauthproto and it took me quite a while to figure - out why I couldn't connect. - - 2) the IP address at your ISP's end must be correct. - - How can I find out (1) whether my ISP wants pap or chap and (2) what his - IP address is ? you might ask. Generally, your ISP should have provide - this information to you. But, if he didn't, or you've mislayed the - documentation (as I did), there's still hope. - - Fortunately, J"org Wunsch implemented the sPPP kernel code so that it - provides all the information required if the interface is configured - with the debug flag set (e.g. ``ifconfig isp0 debug''). It's just a - little cryptic. - - By the way, I suggest turning the debug flag on until you have things - working and then turning it off. The debug output is rather voluminous - and could fill up your /var partition, otherwise. - - The debug output will appear on the console and also be logged to - /var/log/messages (under FreeBSD) unless you changed /etc/syslog.conf. - - A. How to figure out the authproto - ---------------------------------- - - Here is an example where I configured isp0 with myauthproto=pap, my - ISP wanted chap, but was willing to accept pap: - - /kernel: isp0: lcp up(starting) - /kernel: isp0: lcp output <conf-req id=0x7 len=10 5-6-34-e4-30-5a> - /kernel: isp0: lcp input(req-sent): <conf-req id=0x1 len=30 0-4-0-0-1-4-5- - f4-3-5-c2-23-5-11-4-5-f4-13-9-3-0-c0-7b-6e-fe-b5> - ^^^^^ - |___ c223 is chap, it's what the ISP wants to use - - /kernel: isp0: lcp parse opts: 0x0 [rej] mru auth-proto 0x11 [rej] - x13 [rej] send conf-rej (I didn't agree) - /kernel: isp0: lcp output <conf-rej id=0x1 len=21 0-4-0-0-11-4-5-f4-13-9-3- - 0-c0-7b-6e-fe-b5> - /kernel: isp0: lcp input(req-sent): <conf-ack id=0x7 len=10 5-6-34-e4-30-5a> - /kernel: isp0: lcp input(ack-rcvd): <conf-req id=0x2 len=13 1-4-5-f4-3-5- - c2-23-5> - /kernel: isp0: lcp parse opts: mru auth-proto - /kernel: isp0: lcp parse opt values: mru 1524 auth-proto [mine 0x0 != - his chap] send conf-nak (we want to use pap, not chap) - /kernel: isp0: lcp output <conf-nak id=0x2 len=9 3-5-c0-23-5> - ^^^^^ - |___ c023 is pap - - /kernel: isp0: lcp input(ack-rcvd): <conf-req id=0x3 len=12 1-4-5-f4-3-4- - c0-23> (he agrees to use pap) - /kernel: isp0: lcp parse opts: mru auth-proto - /kernel: isp0: lcp parse opt values: mru 1524 auth-proto send conf-ack - /kernel: isp0: lcp output <conf-ack id=0x3 len=12 1-4-5-f4-3-4-c0-23> - he agrees to use pap ___|^^^^^ - - so, if you have problems in the lcp phase, check which authentication method - your ISP wants to use. Usually chap is prefered, but pap will be accepted. - - B. How to figure out the ISP's IP address - ----------------------------------------- - - ====================================================================== - - UPDATE NOTE (February 8, 1999): - - Jan Riedinger writes: - --------------------- - >I further think Gary should mention - >in the FAQ in the section "B. How to figure out the ISP's IP address - >that it isn't normaly necessary to do it because of the auto - >address negotiation. - - Gary answers: - ------------- - I think you're right. I wrote that stuff before the support for - negotiation of the IPS's address was added to if_spppsubr.c. - - ====================================================================== - - - I also intentionally configured the interface with the wrong address for - my ISP, like this: - - ifconfig isp0 0.0.0.0 10.0.0.1 debug link1 - - this means that I want the ISP to assign me an address (the 0.0.0.0) and - that I expect him to use 10.0.0.1 (which is wrong). Here's the result: - (note that these addresses have been changed by me) - - /kernel: isp0: phase network - /kernel: isp0: ipcp open(initial) - /kernel: isp0: ipcp up(starting) - /kernel: isp0: ipcp output <conf-req id=0x9 len=10 3-6-0-0-0-0> - /kernel: isp0: ipcp input(req-sent): <conf-req id=0x1 len=16 2-6-0-2d-f-1- - 3-6-c-22-38-4e> - /kernel: isp0: ipcp parse opts: compression [rej] address send conf-rej - /kernel: isp0: ipcp output <conf-rej id=0x1 len=10 2-6-0-2d-f-1> - /kernel: isp0: ipcp input(req-sent): <conf-nak id=0x9 len=10 3-6-c-22-38-4e> - /kernel: isp0: ipcp nak opts: address [wantaddr 12.34.56.78] [agree] - ^^^^^ - |___ he assigns me this - - /kernel: isp0: ipcp output <conf-req id=0xa len=10 3-6-c3-b4-eb-63> - /kernel: isp0: ipcp input(req-sent): <conf-req id=0x2 len=10 3-6-62-4c-36-20> - /kernel: isp0: ipcp parse opts: address - /kernel: isp0: ipcp parse opt values: address 98.76.54.32 [not agreed] - ^^^^^ - |_this is *his* address - send conf-nak - /kernel: isp0: ipcp output <conf-nak id=0x2 len=10 3-6-a-0-0-1> - I expect a different address and (incorrectly) reject what he wants. - I tell him that I expect 10.0.0.1. After this the connection fails. - - Anyway, I now know that his address is really 98.76.54.32 and can use - it to correctly configure the interface. - - With the correct IP address I shoulkd now be able to connect with no - problems. As stated above, the authorization protocol is normally not - so important since most ISPs are willing to use pap, although chap is - more secure. Generally, I'd try chap first and only switch to pap if - the ISP doesn't accept it. - - (by Gary Jennejohn, Home - garyj@muc.de, Work - garyj@fkr.dec.com) - - - -2. does anyone know a software that can receive/send fax over ISDN ? -================================================================================ - - > Hi, - > - > does anyone know a software that can receive/send fax over ISDN? I am - > using a Fritz!Card, which can handle group 3 (analogous) fax, but I - > can't find any hint in the i4b software that this is supported in any - > way. - -This is probably not implemented. - -Implementing G3 fax in ISDN would mean simulating an analog modem -on the digital link. This means having to generate the right waveforms -for the modulated data, and receive analog data from the other end -which you had to run FFT analysis on and then interpret. - -In addition you have to do this in realtime, to be able to deal with -the timing involved in the fax protocol, something neither -FreeBSD or Linux is good at in their native form.. - -A third point is that a software simulated faxmodem usually does not -work well. I tested Teles software faxmodem in Win-95 towards an Ericsson V34 -HE modem, and was able to send faxes from the ISDN card at 4800 baud -only, and receive faxes ad 9600 baud only(!) (And it is not the -Ericsson modems fault, it works flawlessly towards other fax machines.) - -My point is that the best thing to do is to use an ordinary faxmodem -to handle faxes with Hylafax of mgetty+sendfax or efax, or you may use -a combined ISDN card with an analog part. - -Of course, if you are crazy enough, you may try to implement a -software simulated modem in e.g. RT-linux, or a similar realtime -extension for FreeBSD. - -Best regards, -Nils Ulltveit-Moe (etonumo@eto.ericsson.se) - - - -3. does i4b callback only work with setups where the remote end returns a busy ? -================================================================================ - -> Is my assumption correct, does i4b callback only work with setups where -> the remote end returns a busy on the dialin? - -Yes - otherwise you'll pay for the connection, at least here in Germany. - -Most routers support two kind of callbacks - the one that i4b supports -means: the called system rejects (so no charge for this connection), waits -a configurable time and the calls back. Information on who has called and -who is to be called back relies on the ISDN calling party number information -and stuff statically configured in the routers (or isnd's) configuration. - -The other type of callback (not supported by i4b right now) means: the -called system accepts the connection and starts ppp negotiation. During this -the ppp's aggree to do a callback. Information on who called in and who is -going to be called back is subject to the authentication/negotiation already -done by the two ppp's. Then ppp closes down, the connection is disconnected -and the called system calls back. - -I've never seen someone actually use the second type due to its obvious -disadvantages. It may be usefull if you travel, call in from an unknown -number and want to be called back at that number. - -Martin Husemann <martin@rumolt.teuto.de> - - -4. trouble with kernel options IPFIREWALL and IPDIVERT and natd -================================================================================ - - NOTICE: section obsolete since IP address changes are handled properly now! - =========================================================================== - -This section -> Trying to build a router/gateway between my privat Ethernet and -> the Internet (via my ISP), I have problems with I4B or NAT (I think:). -> -> The 2.2.5-R kernel with options IPFIREWALL and IPDIVERT works fine -> with ISDN4BSD 0.50-alpha and firewall rule 'pass all from any to any'. -> However, when I add 'divert natd all from any to any via isp0' -> and start natd, name server lookups to the ISP's NS don't work. -> -> Also, ping and nslookup fails from any other internal host. - -I had exactly the same problems. natd doesn't seem to get a message if -the IP address of the interface changes (after successful dialout). -I have to manually send a HUP signal to natd. I do this via the following -(ugly?!) hack: - -I added the following two lines to the system section of isdnd.rc: -regexpr = "call active" # look for matches in log messages -regprog = hup_natd # execute program whan match is found - -The small script "hup_natd", located in /etc/isdn, looks like: -#!/bin/sh -pid=`cat /var/run/natd.pid` -kill -HUP $pid -sleep 3 -kill -HUP $pid -sleep 5 -kill -HUP $pid - -It looks ugly, but at least for me it works. The two sleeps are necessary -since I have to wait for ppp negotiation to complete (I don't get a message -from isdnd for that). If I'm lucky I have my connection after 3 seconds, -but 8 seconds should suffice for worst case (the first HUP without a sleep -sometimes even succeeded on a slow 486/33 with 8MB RAM, more HUPs don't hurt). - -I'm really interested in some more elegant method. - -Daniel (rock@cs.uni-sb.de) - - -Arve Ronning replied: -===================== - -> I had exactly the same problems. natd doesn't seem to get a message if -> the IP address of the interface changes (after successful dialout). - -Well, it (natd) _does_ pick up the dynamic address supplied for isp0. -Try 'natd -verbose ...' and you'll see it. Otherwise I agree, there is -certainly something missing in natd's functionality, or maybe sppp -does'nt -supply what it's supposed to ?? - -> I have to manually send a HUP signal to natd. I do this via the following -> (ugly?!) hack: - -YES...super; strange but correct. It works when I send natd a -HUP after -sppp is up. Thanx for the tip. However, natd must be -HUPed _every_ time -sppp has been down (idle timeout) and comes back up! - -> I'm really interested in some more elegant method. - -So am I, let's see what may come out of the discussion on the list. - - - -5. I want to use -r with isdnd but it does not work -================================================================================ - -> > Use isdnd in fullscreen mode. -> -> I tried that already, but got an error when I start isdnd that way: -> -> /usr/local/bin/isdnd -d 0xf9 -f -r /dev/ttyv1 -t cons25 -> -> root is logged in on device /dev/ttyv1, the message in /var/log/messages looks like: -> -> "May 22 11:52:28 asterix isdnd[4160]: ERR ERROR, cannot setup tty as controlling terminal: Operation not permitted" -> -> How can I give this device permission ? - - -In case you want to use switch "-r" noone else _must_ use the tty you redirect -to, you have to remove the getty from the virtual terminal in /etc/ttys and -restart the init process. - - -6. How do I configure and run the answering machine (under FreeBSD 2.2.x) ? -================================================================================ - -The answering machine will be activated, when isdnd executes the program -that has been named in "/etc/isdn/isdnd.rc" in the section "telephone -answering" at entry "answerprog = ". If the program is executed -without a pathname, the answer program is expected in "/etc/isdn". -Examples of such programs can be found in "/etc/isdn/samples". They -are named: - - "answer" answers only, no recording - "record" answers, and records messages - "tell" the number of the calling person is told, - no recording. - "tell-record" calling number as answer, message is recorded - "isdntel.sh" answers and records messages; by using the - program "isdntel", one has the control over - the recorded messages in the directory - "/var/isdn". Look at "man isdntel" and - "man isdntelctl". - -These programs have to be altered to suit your needs. Unfortunately there -is no program with which you can record your answer message. This is not -really bad, because you only have to alter the above mentioned program -"record" a bit (comment out the "if ... fi" statements for the beep -and msg messages). You have to create the directory "/var/isdn" first in -order to record messages. They will be stored in this location then. - -Stefan Herrmann <stefan@asterix.webaffairs.net> - - -7. Teles S0/16.3 ... unknown ? -================================================================================ -Hi, - -I have just purchased a Teles S0/16.3 card. -But it's not what i4b is looking for .... I mean, it's a different card. - -The docs (and sources)of i4b talks about a Telws S0/16.3 card with 3 -address: d80 etc. - -This one (is not PnP) has jumpers for 0x180 0x280 0x380. - -It has the SIemens Chips numbered PSB 21525 N (HSCX TE V2.1) and PSB -2186N V1.1 (ISAC-S TE). - -I undestand that the 16.3c is not supported, but over this board is -written "TELES.S0/16.3 Revision 1.3" - -Can anybody tell me what is this card ??? - -answer: -------- - -It's not a different card. The jumpers are documented to select -IO-address 0x180, 0x280 or 0x380 in some TELES manuals. -But in fact they select the addresses 0xd80, 0xe80 or 0xf80. - -Wolfgang - - -And an additional note from Poul-Henning Kamp: ----------------------------------------------- -There is an intricate story behind this, in short some ISA cards -only decode the first 10 address bits (0x3ff), which over the years -has resulted in a mutation the "de-facto-spec" such that addressbits -10-15 can be used by the card for selecting various stuff. This -is extensively used on obscure cards with massive IO needs, sound, -IEEE488 and ISDN cards often belong in this category. - - - -8. How do i integrate a new lowlevel driver into i4b ? -================================================================================ - -1) Request a flag value from me -2) add an entry for the card into FreeBSD/CONFIG -3) add driver filename to FreeBSD/files.i386.cat -4) add entry for the card to FreeBSD/options.i386.cat -5) add support to print type of card to diehl/diehlctl/main.c -6) add support to print type of card to isdnd/support.c, name_of_controller() -7) place your file as named in 3) into directory layer1 -8) add the flag value and function prototypes to layer1/i4b_l1.h -9) add support for NetBSD to layer1/isa_isic.c -10) add support for attach/probe to layer1/i4b_isic.c -11) add card type to i4b/i4b_ioctl.h and update CARD_TYPEP_MAX -12) add an entry to the man page man/isic.4 - -Produce diffs (please use context diffs, flag "-c" for diff) and send them in. - - -9. Why it always says "no Space in TX FIFO - State F4 awaiting" ? -================================================================================ - -as I wrote about two weeks ago I had massive problems concerning this -"no space in TX FIFO"-thing, - -/kernel: i4b-L1-ph_data_req: No Space in TX FIFO, state = F4 Awaiting Signal - -Even though I used a correctly recognized Teles S0/16.3 nonpnp isdncard, -nothing worked, errormsgs were flooding the console until I rebooted the box. - -I decided to play around in the BIOS-settings, I first just set them all -to default, which didn't work, and then changed lots of things - unfortunately -I can't remember them. After about hundreds of trial 'n errors I gave up. - -A few days ago I just made another attempt, booted the box and to my surprise -it all worked without the smallest problem, great data rates :) - -I tried hard to found what the something special was I changed in the BIOS -settings, but I just couldnt get isdnd back to its stupid behaviour it -showed all the time before, but I would recommend everybody who has this -kind of problem to look into his BIOS. - - (from Meike Aulbach, strange@stoned.rhein-main.de) - - -i4b now works for me, I had a USB-device interfering on IRQ 9, -which was supposed to be only for my Creatix Card. -(NetBSD 1.3, Creatix) - -Strange enough, my DOS s0-test worked, are they just polling the card? - -Even when the testsoftware under DOS is working, don't be shure, that -your hw-setup is correct for xxx(x)BSD. Triplecheck all your IRQ and -enable and disable PNP to triple-verify. Even unconfigured devices can -block your card. ..... - -And that took me more than 2 months to discover :-(((( - - (from Andreas Lohrum, andreas.lohrum@consol.de) - - -when i changed the mainboard of a box that ran i4b alright, i forgot to -set 'used by isa' in the pnp-bios-settings for the irq of my teles -isdn-card. because of that some pci-card got the interrupt that the -isdn-card should have gotten. -i then also got this error: 'No space in TX FIFO'. - -The reason occurred to my rather quick, but i would think, that this would -be a nice hint in a FAQ :) - - (from Heiko Schaefer, hschaefer@fto.de) - - -after my huge amount of problems, Meike's hint (changing the -ISA/PNP-settings in the BIOS) finally fixed things. -I have only tried out this stuff with my Creatix-card, I'll check -out the PNP-stuff with my Sedlbauer-card soon too though. - - (from Harold Gutch, logix@foobar.franken.de) - - -10. Incoming alert - what does it mean ? -================================================================================ - -In the log on vty6 (isdnd full screen log) I'm seeing - -16.07.98 11:42:35 CHD 00001 rwth rate 90 sec/unit (rate) -16.07.98 11:42:35 CHD 00001 rwth dialing from 4191236 to 441291234 -16.07.98 11:42:35 CHD 00001 rwth outgoing call proceeding (ctl 0, ch 0) -16.07.98 11:42:35 CHD 00001 rwth incoming alert <<<<<<<<<<<<<<< -16.07.98 11:42:35 CHD 00001 rwth outgoing call active (ctl 0, ch 0) - -What does this 'incoming alert' mean? - - -It means that it is "ringing" at the remote end. - - -11. How do i change irq's on my teles 16.3 card ? -================================================================================ - -Question: - -So how do you change irq's on your teles 16.3 card (under FBSD or DOS, -I don't have and don't want to have Windows running on that computer) ? - -Answer: - -The irq is configured into the card each time the driver under whatever -OS you currently boot initializes the card. Thus, change the irq for the -isic driver in your kernel config file to one of the supported (!) irqs -for this card (hint: read "man isic") which is currently unused in your -machine and generate a new kernel. - - -12. NL: i'm getting CAUSE 100 or CAUSE 101 when dialling out -================================================================================ - -This one seems to be specific for the Netherlands. (-hm) - -Question: - -I'm trying to get i4b running on my new FreeBSD 2.2.8 system. The kernel -compiles smootly and everything is looking fine until it's time to dial. -I get the following error: - -Feb 10 20:31:00 goofy isdnd[498]: CHD 00018 I4BPPP outgoing call disconnected (remote) -Feb 10 20:31:00 goofy isdnd[498]: CHD 00018 I4BPPP cause 101: Message not compatible with call state (Q.850) -Feb 10 20:31:00 goofy isdnd[498]: ERR set_channel_idle: controller [0], invalid channel [-1]! -Feb 10 20:31:00 goofy isdnd[498]: ERR msg_disconnect_ind: set_channel_idle failed! - -The remote site is a Cisco 4000 type router. I used debug to take a view at -the ISDN events on the router but according to that the call doesn't arrive -over there. - -Same hardware has worked fine with FreeBSD 2.2.6/i4b 0.63. - -Who knows what's wrong? - - -Answer: - -This sounds very much like your local phone number or remote phone number -is configured wrongly... in the Netherlands you need to specify the number -EXCLUDING the city code... so if you live in Utrecht and your number is -0301234567 you specify 1234567. - -I have seen this in several locations in the Netherlands for years, not -just with i4b, but also with differentt isdn equipment.. why? guess it -simply depends on which operator defines your line or what exchange it -is connected to... :P -What I found is that what solved this with other isdn hardware/software, -also solves it for i4b.. ie.. make sure the local phone number is -specified, and is specified without the city code. -The numbering plan should be 'unknown' - -Anyway, it would be nice if the Dutch ptt (they are called KPN btw) -would tell us why this happens... they havent been able to tell me in the -past so I guess I give up on that, but if everyone finds out whats exactly -happening here I'd be interested to know... :) - -List of number configurations that I have found to almost always work in -the Netherlands: - -1. Local phone number: - usually your prefered msn without city code works here. - (ie, 1234567 if you would like to use 0201234567 for outgoing calls) - on some locations leaving it blank or defining it with the city code, - but without the leading 0 works as well here. - -2. remote phone number: - When this is a 'local' call, don't specify city code. - For calling parties in other cities you of cource have to use the city - code... in general you can say that KPN only accepts the shortest - possible notation where it would still be clear who you want to call. - -3. numbers for incomming call recognition: - KPN always specifies incoming caller ids with city code, but without - leading 0. so 0201234567 will be displayed as 201234567 - - -Hope this helps. -Bart - - (from Bart van Leeuwen bart@ixori.demon.nl) - - -14. I'm using sPPP. I can connect to my ISP but no TCP/IP services work. HELP! -============================================================================== - -This is probably because you have the RFC1323 - TCP Extensions for High -Performance - support turned on and your ISP (or some router in the loop) -is discarding the extensions. - -This can easily be checked by doing ``sysctl net.inet.tcp.rfc1323''. If the -result is 1, then the RFC1323 support is turned on. - -Turn this off by doing ``sysctl net.inet.tcp.rfc1323=0'' (This is -called "net.inet.tcp.do_rfc1323" under BSD/OS). - -For FreeBSD make sure that tcp_extension="NO" is in your /etc/rc.conf -(/etc/defaults/rc.conf with more recent versions of FreeBSD) and -/etc/rc.conf.local (in -STABLE and upcoming 3.2) - -This may be different for NetBSD, OpenBSD and BSD/OS. - -Martin Husemann writes: ------------------------ -This does apply for NetBSD too (and probably OpenBSD, since it's been -in NetBSD for a long time). The sysctl name is even compatible ;-) We don't -have a coresponding rc.conf entry, I do it in /etc/netstart.local. - -I would suggest to set this to 0 on all machines routed over ISDN (not only -the router), as this "high speed options" in fact do slow down an ISDN link -by making VJ "compression" impossible - as far as I understood it. So there -should be a more general advice in the FAQ, not only "turn it off if it -doesn't work for you". - -I've only seen the problems against old linux kernels (about two years ago), -are there still machines out there that have such a broken TCP/IP stack? We -should start to blame the vendors... - - (by Gary Jennejohn, garyj@muc.de, with additions from - Harold Gutch <logix@foobar.franken.de> and - Martin Husemann <martin@rumolt.teuto.de>). - - -15. i4b 0.80.00: problems with AVM Fritz PCI -============================================================================== - -Question: -========= - -The system is FreeBSD 3.1-RELEASE with i4b-00.80.00-beta-070599 [...] - -I'm trying to compile a Kernel with support for my AVM Fritz!PCI card, -however, when compiling, it fails with the following error - -sh ../../conf/newvers.sh GENERIC -DAVM_A1_PCI -cc -c -O -Wreturn-type -Wcomment -Wredundant-decls -Wimplicit -Wnested- -externs --Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline - -Wuninitializ -ed -Wformat -Wunused -fformat-extensions -ansi -nostdinc -I- -I. -I../.. --I/us -r/include -DAVM_A1_PCI -DKERNEL -DVM_STACK -include opt_global.h -elf -vers.c -loading kernel -i4b_isic_pci.o: In function `i4b_pci_attach': -i4b_isic_pci.o(.text+0x141): undefined reference to `avma1pp_map_int' -i4b_isic_pci.o: In function `isic_pciattach': -i4b_isic_pci.o(.text+0x196): undefined reference to `isic_attach_avma1pp' -*** Error code 1 - - -Solution: -========= - -> I have added -> -> i4b/layer1/i4b_avm_fritz_pci.c optional isic device-driver -> -> and am recomiling at the moment, but given that it's a 486, it could take -> some time :-) - -The problem appears to be that overinstall.sh does not update files.i386 -and options.i386, and that AVM_A1_PCI was added after 3.1-RELEASE and -hence is not defined. - -Manually editing these files (using install.sh as a guide) allows the -kernel to compile cleanly. - - -(from Rich Wood, rich@dynamite.org) - - -16. How do i setup logfile rotation for isdnd ? -============================================================================== - -For syslog-based logging: -------------------------- - -man newsyslog (on FreeBSD) - -You just add a line to /etc/newsyslog.conf: -/var/log/isdnd.log 664 7 100 * Z -and you are all done... - -(From: Andreas Haakh <ah@alvman.RoBIN.de>) - - -For logfile-based logging: --------------------------- - -I suggest using newsyslog(8). Adding a line like: - -/var/log/isdn.log 664 100 * 168 Z /var/run/isdnd.pid - -to /etc/newsyslog.conf will do the job (here: once a week, for the next -100 weeks) with compression of the old log. - -This is the standard method for other daemons (apache, etc.). - -(From: Udo Schweigert <ust@cert.siemens.de>) - - -17. How do i setup dialin from Windows NT RAS to i4b ? -============================================================================== - -> > I need to be able to dial in from a WNT box, equipped with TELES h/w and -> > s/w, to a FreeBSD machine. I don't have a clue what RAS is using. -> > I've tried -> > ipr and isp. The latter seems to work but is hanging on authentication. Is -> > there somebody who has done this before and is able to give me some hints? -> -> RAS is using PPP, so you should be able to get the isp interface working. I -> haven't done it so I can't give you concrete hints, but setting the isp -> interface to debug mode and posting the log (with passwords cut out or with -> test passwords) could help us to debug your setup. - -I have several customers using sPPP do dial in from their W95/W98/WNT. - -If You use FreeBSD_3.2-BETA with i4b-071 or older then you have to apply -the attached patch to /sys/net/if_spppsubr.c (patch -p0 <patchfile). - -You need to configure isp0. See the manpages or the supplied templates in -the i4b-distribution. I would suggest to supply an ip-number for the -isp0-interface and force the clients to accept this value. -Don't forget to supply the relevant parameters to sppconfig_isp0 in -/etc/rc.conf... - -On WNT you have to install the CAPI-2.0-drivers and Dialin-network. - -Create a new entry and check the following box: -* Connection to internet -select the appropriate ISDN-device for dialout, insert a phone-number -and that's it. -You are asked for username & password. Supply the values You did define in -spppconfig_isp0 and dial... - -Patch for i4b version 0.71 or older: ------------------------------------- - -*** /sys/net/if_spppsubr.c Sun Dec 27 22:30:44 1998 ---- /sys/net/if_spppsubr.c.orig Sat May 8 10:54:14 1999 -*************** -*** 2056,2062 **** - if (debug) - addlog("[non-empty] "); - /* suggest a zero one */ -! p[2] = p[3] = p[4] = p[5] = 0; - break; - - case LCP_OPT_MRU: ---- 2056,2062 ---- - if (debug) - addlog("[non-empty] "); - /* suggest a zero one */ -! /* p[2] = p[3] = p[4] = p[5] = 0; */ - break; - - case LCP_OPT_MRU: -*************** -*** 2668,2678 **** - addlog("%s [not agreed] ", - sppp_dotted_quad(desiredaddr)); - -- p[2] = hisaddr >> 24; -- p[3] = hisaddr >> 16; -- p[4] = hisaddr >> 8; -- p[5] = hisaddr; - } - break; - } - /* Add the option to nak'ed list. */ ---- 2668,2678 ---- - addlog("%s [not agreed] ", - sppp_dotted_quad(desiredaddr)); - - } -+ p[2] = hisaddr >> 24; -+ p[3] = hisaddr >> 16; -+ p[4] = hisaddr >> 8; -+ p[5] = hisaddr; - break; - } - /* Add the option to nak'ed list. */ - -(From: Andreas Haakh <ah@alvman.RoBIN.de>) - - -18. How can I convert my old .g711a files to the new format? -================================================================================ -I got the best results with: -cat /some/path/dwhello.g711a | alaw2ulaw | g711conv -u > /tmp/newhello.al - -(From: David Wetzel <dave@turbocat.de>) - - -19. I have lots of old .g711a files to convert what can I do? -================================================================================ - -Create a shell script (/tmp/csnd.sh) with this contents: -#!/bin/sh - -OLDFILES=`ls *.g711a` -#echo $OLDFILES - -for THEFILE in $OLDFILES -do -( - echo -n "converting $THEFILE..." - BASENAME=`basename $THEFILE .g711a` - - /bin/cat $THEFILE | alaw2ulaw | g711conv -u > $BASENAME.al - echo "done" -) - -done -###### END - -then type "chmod a+x /tmp/csnd.sh" in you shell. -cd /usr/local/lib/isdn (or where your old sounds live) -/tmp/csnd.sh -Optional: -rm *.g711a (you should know what you do here :-) - -(From: David Wetzel <dave@turbocat.de>) - - -20. How can I convert the .al files to Sun/NeXT .au/.snd/.vox files? -================================================================================ - -/bin/cat /some/path/old.al | sox -t raw -A -b -r 8000 - -t .au /some/path/new.snd - - -(From: David Wetzel <dave@turbocat.de>) - - -21. Help, isdn4bsd 0.82 fails to probe my Elsa PCC-16! -================================================================================ - ->Isdn4bsd 0.82 fails to probe my Elsa PCC-16. It just can't find isic0. - -flags have changed from 19 to 20. - - -(From: "Frank J. Beckmann" <frank@vogon.agala.harz.de>) - - -22. How do i enable and configure userland PPP with i4b ? -================================================================================ - -NOTE: this is the procedure used as of end of July 1999, it may change in - the near future! - -Get the current ppp sources from - - http://www.freebsd.org/~brian - -unpack them and apply the patch - - ftp://ftp6.uk.freebsd.org/pub/PPPoISDN/pppcommit.patch - -to the ppp directory (where you just unpacked the above mentioned ppp source). -Make and install the result. - -Have a look at the user-ppp directory and the end of etc-isdn/isdnd.rc.sample -for ppp and i4b sample configurations to get things up and running. - -More information to ppp setup can be found at - - http://www.Awfulhak.org/ppp.html - http://www.freebsd.org/doc/handbook/ppp-and-slip.html - http://www.freebsd.org/doc/faq/ppp.html - -and in the directory "user-ppp" of the isdn4bsd distribution. - - -23. What is the procedure to install a new i4b on FreeBSD 3.x ? -================================================================================ - -cd /usr/src -mkdir i4b -cd i4b -tar xvzf i4b-00.82.00-beta-140799.tar.gz -cd FreeBSD -sh overuninstall.sh -sh overinstall.sh -cd .. -make cleandir -make depend -make -make install -cd /sys/i386/conf -config <YOURKERNEL> -cd ../../compile/<YOURKERNEL> -make clean -make depend -make -make install -shutdown -r now - - -(From: Luke Roberts <luke@roberts.nl>) - - -24. Why do i get "ifconfig: ioctl (SIOCAIFADDR): file exists" ? -================================================================================ - -Ich ?berlege gerade, aber ich glaube, ich bekomme sie auch. Das -Problem existiert schon seit geraumer Zeit immer beim Konfigurieren -eines point-to-point Interfaces (SLIP, PPP). - -Das `file exists' ist ein Misnomer, es r?hrt daher, da? der -Routingcode die errno's in einer leicht ver?nderten Weise benutzt, so -da? nicht neue errno's daf?r erfunden werden mu?ten. Lies es als -`route exists'. (Und falls Du im Zusammenhang mit Routing mal ein `no -such process' siehst, lies es als `no such route'.) - -Die Meldung ist harmlos. Sonst h?tte ich mir schon l?ngst mal die -M?he gemacht, mich durch den ganzen Routing-Code zu hangeln und zu -sehen, warum das passiert. - -(From Joerg Wunsch <j@uriah.heep.sax.de>) - - -25. How to properly operate isdnd's fullscreen output in a 132x60 vty -================================================================================ - -Q: I'm using allscreens_flags="132x60" in /etc/rc.conf but the vty gets - switched after isdnd is started, so isdnd didn't know about the new - dimensions of the screen. - -A: This one's easy: - In /etc/rc.isdn change - isdn_ttype=cons25 - to - isdn_ttype=cons60l1wide - /usr/sbin/vidcontrol VESA_132x60 < ${isdn_fsdev} - - The new VESA modes don't have termcap entries yet, so you'll - have to add one yourself to define 132x60: - - cons60l1wide|cons60-iso8859-1:\ - :co#132:tc=cons60l1: - - -(From: "H. Eckert" <ripley@nostromo.in-berlin.de>) - - -26. NetBSD: i see isic0 while booting but I cannot access my Fritz!Card -================================================================================ - -I got his: -isic0 at pci0 dev 8 function 0: Fritz!Card -isic0: ISAC 2085 Version A1/A2 or 2086/2186 Version 1.1 (IOM-2) -isic0: interrupting at irq 11 -(...) -i4b: ISDN call control device attached -i4btrc: 2 ISDN trace device(s) attached -i4bctl: ISDN system control port attached -i4brbch: 4 raw B channel access device(s) attached -i4btel: 2 ISDN telephony interface device(s) attached -i4bipr: 2 IP over raw HDLC ISDN device(s) attached (VJ header compression) -i4bisppp: 2 ISDN SyncPPP device(s) attached - -But I could not use the card, because I forgot -"options __I4B_IS_INTEGRATED" in the kernal config file. -[Jan Sparud helped me to find that] - -(From: David Wetzel <dave@turbocat.de>) - - -27. i4b_pci_attach: pci_map_port 1 failed! What does this mean ? -================================================================================ - -Q: Hi, - - I am trying to set up an ELSA QuickStep 1000pro PCI ISDN adaptor in a FreeBSD - 3.3 box. I configured the kernel according to the i4b.ps documentation. At - boottime, these messages are displayed: - - isic0: <ELSA QuickStep 1000pro PCI ISDN adaptor> rev 0x01 int a irq 11 on - pci0.1 7.0 - i4b_pci_attach: pci_map_port 1 failed! - - What does this mean ?, should I be worried ?, will the device function - properly ? - -A: Problem is solved. - - In the BIOS, the PCI slot containing the ISDN card was set to IRQ 14 (having - no IDE devices). The isic driver finds the card using irq 11 and then says - "pci_port_map_port failed". The slot is set to IRQ 11 (which was free also) - and everything works fine here .. - -From: Joost Mulders <dhcp@j-mulders.demon.nl> - - -28. What is: i4b-L2 i4b_rxd_ack: ((N(R)-1)=35) != (UA=36) !!! -================================================================================ - -> Some time I get follow message at console: -> -> i4b-L2 i4b_rxd_ack: ((N(R)-1)=35) != (UA=36) !!! - -A layer 2 error occured. These types of errors are automatically -corrected by the layer 2 protocol. - - -29. Why does isdnd take up 95% CPU time ? -================================================================================ - -Q: i just set up my isdn w/ user ppp, it works nice, but my isdn daemon takes - up 95% of my CPU time. - - output of "top": - --snip-- - Mem: 42M Active, 4616K Inact, 11M Wired, 2896K Cache, 14M Buf, 408K Free - Swap: 132M Total, 5128K Used, 127M Free, 3% Inuse - - PID USERNAME PRI NICE SIZE RES STATE TIME WCPU CPU COMMAND - 63 root 58 0 1372K 752K RUN 38:05 93.75% 93.75% isdnd - 207 gboehm 2 0 25196K 22044K select 1:15 2.20% 2.20% XF86_Mach64 - --/snip-- - -A: i just found out what i did wrong ... - i forgot to set these both lines in my /etc/rc.conf: - - isdn_fsdev="NO" - isdn_flags="" - - had to do that if i want to run isdnd as a daemon service, 'cause the - defaults in /etc/defaults/rc.conf are: - - isdn_fsdev="/dev/ttyv4" # Output device for fullscreen mode (or NO for daemon mode). - isdn_flags="-dn -d0x1f9" # Flags for isdnd - -From: Guido Boehm <g.boehm@web.de> diff --git a/share/examples/isdn/KERNEL b/share/examples/isdn/KERNEL deleted file mode 100644 index a80dcce..0000000 --- a/share/examples/isdn/KERNEL +++ /dev/null @@ -1,82 +0,0 @@ -#--------------------------------------------------------------------------- -# -# example fragment of a kernel config file to include all -# parts of isdn4bsd. This file should be appended to your -# kernel config file and then edited (stripped down) to -# match your hardware configuration. -# -# last edit-date: [Sun Oct 21 11:03:37 2001] -# -# $FreeBSD$ -# -#--------------------------------------------------------------------------- - -# Siemens/Infineon chipsets -device isic 4 - -# Winbond chipset -device iwic 4 - -# AVM Fritz PCI -device ifpi 4 - -# AVM Fritz PCI version 2 -device "ifpi2" 4 - -# Teles 16.3c -device ihfc 4 - -# NETjet-S / Teles PCI-TJ -device itjc 4 - -# AVM Fritz PnP -device ifpnp 4 - -# AVM B1/T1 -device "i4bcapi" -device iavc 4 - -# enable some ISA cards within the "isic" driver -options TEL_S0_8 -options TEL_S0_16 -options TEL_S0_16_3 -options AVM_A1 -options USR_STI -options ELSA_PCC16 - -# enable some ISA PnP cards within the "isic" driver -options TEL_S0_16_3_P -options CRTX_S0_P -options DRN_NGO -options SEDLBAUER -options ELSA_QS1ISA -options SIEMENS_ISURF2 -options ASUSCOM_IPAC -options EICON_DIVA -options COMPAQ_M610 - -# enable ELSA Microlink PCI card within the "isic" driver -options ELSA_QS1PCI - -# protocol stack -device "i4bq921" -device "i4bq931" -device "i4b" - -# control devices -device "i4btrc" 4 -device "i4bctl" -device "i4brbch" 4 -device "i4btel" 2 - -# IP over raw HDLC -options IPR_VJ -device "i4bipr" 4 - -# kernel sppp/isppp -device "i4bisppp" 4 - -# Netgraph interface -#options NETGRAPH -#device "i4bing" 4 - diff --git a/share/examples/isdn/Overview b/share/examples/isdn/Overview deleted file mode 100644 index 7604395..0000000 --- a/share/examples/isdn/Overview +++ /dev/null @@ -1,307 +0,0 @@ - - Short technical overview of isdn4bsd - ==================================== - - Copyright (c) 1998 Hellmuth Michaelis. All rights reserved. - - $FreeBSD$ - - Last edit-date: [Tue Oct 27 11:26:03 1998] - - -hm starting an overview ... - - -Contents: ---------- - Functional block diagram - Layer 1 - Layer 2 - Layer 3 - Debugging control - Layer 4 - ISDN protocol trace - - -Functional block diagram -======================== - - isdndebug isdnd isdntrace - +-------+ +----------------------------------------------------+ +--------+ - | | | | | | - | | | | | | - +-------+ +----------------------------------------------------+ +--------+ - | | | - | | | - | /dev/i4bctl Userland | /dev/i4b /dev/i4btrc<n> | -=============================================================================== - | Kernel | | - | | | - +-------+ +----------------------------------------------------+ +--------+ - | | | | | | - |i4bctl | | i4b | | i4btrc | - | (6) | | (7) | | (8) | - | debug | | Layer 4 - common call control interface | | ISDN | - |control| | | | trace | - +:-:-:--+ +----------------------------------------------------+ +--------+ - : : : ^ ^ ^ - : : : Call | various ptr arrays | Call % - . . . Control | in i4b_l3l4.h | Control % - V V % - +----------------------+ +----------------------+ % - | | | | % - | i4bq931 | ISDN | active card | % - | (5) | ##### | % - | Layer 3 (Q.931) | # | driver | % - | | # | | % - +----------------------+ # +----------------------+ % - ^ # B + % - | i4b_l2l3_func function # | + +------------+ % - | ptr array in i4b_l2l3.h # C +++++ isp |----> % - V # h + +------------+ IP % - +----------------------+ # a + Subsys % - | | # n + +------------+ % - | i4bq921 | # n +++++ ipr |----> % - | (4) | # e + +------------+ IP % - | Layer 2 (Q.921) | # l + Subsys % - | | # + +------------+ % - +----------------------+ # D +++++ tel/rbch |----> % - ^ # a + +------------+ to % - | i4b_l1l2_func function # t + /dev/i4btel<n> % - | ptr array in i4b_l1l2.h # a + or /dev/i4brbch<n>% - V # + % - +----------------------+ # +---------------------+ % - | | # | | % - | isic (ISAC part) | D-ch trace # | isic (HSCX part) |B-ch% - | (2) |%%%%%%%%%%%% # | (3) |%%%%% - | Layer 1 (I.430) | % # | non-HDLC / HDLC |trc % - | | % # | | % - +----------------------+ % # +---------------------+ % - ^ % # ^ % - D-channel | % # B-channels | % - +-----------------------------------------------+ % - | function ptr in % # % - | in isic_softc in %%%%%%%%#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - V i4b_l1.h # - +----------------------+ # - | | # - | isic | # - | (1) | # - | Card hardware driver | # - | for Teles, AVM, USR | # - | | # - +----------#-----------+ # - # # - # # - # # - # # - |=========#===============================#============================| - ISDN S0 bus - - -Layer 1 -======= - -(1) A driver for a special card hardware consists of a - - probe routine - - attach routine - - FIFO read - - FIFO write - - register read - - register write - routines. These routines handle the card/manufacturer specific stuff - required to talk to a particular card. - - The addresses of the read/write routines are put into an array found - in struct isic_softc and they are later called by the macros: - - ISAC_READ(r), ISAC_WRITE(r,v), ISAC_RDFIFO(b,s), ISAC_WRFIFO(b,s), - HSCX_READ(n,r), HSCX_WRITE(n,r,v), HSCX_RDFIFO(n,b,s), HSCX_WRFIFO(n,b,s) - - (see file layer1/i4b_l1.h) - - Files currently used for this purpose are - - i4b_avm_a1.c AVM A1 and AVM Fritz!Card drivers - - i4b_ctx_s0P.c Creatix S0 PnP (experimental!) - - i4b_tel_s016.c Teles S0/16 and clones - - i4b_tel_s0163.c Teles S0/16.3 - - i4b_tel_s08.c Teles S0/8 and clones - - i4b_tel_s0P.c Teles S0/16 PnP (experimental!) - - i4b_usr_sti.c 3Com USRobotics Sportster - - -(2) The files i4b_isac.c and i4b_isac.h contain the code to control the - ISAC chip by using the above mentioned macros. - - Files i4b_l1.c and i4b_l1.h handle stuff used to access layer 1 - functions from layer 2. - - Layer 1 and layer 2 access functionality of each other by using - a well known function pointer array, which contains addresses of - "primitives" functions which are defined in I.430 and Q.921. The - function pointer array for layer 1/2 communication is defined in - file include/i4b_l1l2.h and is initialized i4b_l1.c at the very - beginning. - - File i4b_isic.c contains the main code for the "isic" device driver. - - i4b_l1fsm.c is the heart of layer 1 containing the state machine which - implements the protocol described in I.430 and the ISAC data book. - - -(3) All above code is used for handling of the D channel, the files - i4b_bchan.c, i4b_hscx.c and i4b_hscx.h contain the code for handling - the B-channel, the HSCX is used to interface the userland drivers - isp, ipr, tel and rbch to one of the B-channels and i4b_hscx.c and - i4b_hscx.h contain the code to handle it (also by using the above - mentioned macros). i4b_bchan.c contains various maintenance code for - interfacing to the upper layers. - - -Layer 2 -======= - -(4) Layer 2 implements the LAPD protocol described in Q.920/Q.921. Layer 2 - interfaces to layer 1 by the above described function pointer array, - where layer 1 calls layer 2 functions to provide input to layer 2 and - layer 2 calls layer 1 functions to feed data to layer 1. - - The same mechanism is used for layer 2 / layer 3 communication, the - pointer array interface is defined in include/i4b_l2l3.h ad the array - is initialized at the very beginning of i4b_l2.c which also contains - some layer 1 and some layer 3 interface routines. As with l1/l2, the - l2/l3 array also contains addresses for "primitives" functions which - are specified in Q.920/Q.921 and Q.931. - - i4b_l2.h contains the definition of l2_softc_t, which describes the - complete state of a layer 2 link between the exchange and the local - terminal equipment. - - i4b_l2.c contains the entrance of data from layer 1 into the system, - which is split up in i4b_ph_data_ind() into the 3 classes of layer 2 - frames called S-frame, I-frame and U-frame. They are handled in files - i4b_sframe.c, i4b_iframe.c and i4b_uframe.c together with the respective - routines to send data with each ones frame type. - - i4b_l2timer.c implements the timers required by Q.921. - - i4b_tei.c contains the TEI handling routines. - - i4b_lme.c implements a rudimentary layer management entity. - - i4b_util.c implements the many utility functions specified - in Q.921 together wit some misc routines required for overall - functionality. - - i4b_mbuf.c handles all (!) requests for mbufs and frees all mbufs used - by the whole isdn4bsd kernel part. It should probably be moved else- - where. - - i4b_l2fsm.c and i4b_l2fsm.h contain the heart of layer 2, the state- - machine implementing the protocol as specified in Q.921. - -Layer 3 -======= - -(5) i4b_l2if.c and i4b_l4if.c contain the interface routines to communicate - to layer 2 and layer 4 respectively. - - i4b_l3timer.c implements the timers required by layer 3. - - i4b_q931.c and i4b_q931.h implement the message and information element - decoding of the Q.931 protocol. - - i4b_q932fac.c and i4b_q932fac.h implement a partial decoding of facility - messages and/or information elements; the only decoding done here is - the decoding of AOCD and AOCE, advice of charge during and at end of - call. - - As usual, i4b_l3fsm.c and i4b_l3fsm.h contain the state machine required - to handle the protocol as specified in Q.931. - - Layer 3 uses a structure defined in include/i4b_l3l4.h to store and - request information about one particular isdncontroller, it is called - ctrl_desc_t (controller descriptor). It contains information on the - state of a controller (controller ready/down and which B channels are - used or idle) as well as a pointer array used for communication of - layer 4 with layer 3: layer 3 "knows" the routines to call within - layer 4 by name, but in case layer 4 has to call layer 3, several - possibilities exist (i.e. active / passive cards) so it has to call - the routines which the ISDN controller had put into the the function - pointer array (N_CONNECT_REQUEST, N_CONNECT_RESPONSE etc) at init time. - - Layer 3 shares a structure called call_desc_t (call descriptor) with - layer 4. This structure is used to describe the state of one call. The - reference to layer 3 is the Q.931 call reference value, the reference to - layer 4 (and the isdn daemon, isdnd) is the cdid, an unique integer - value uniquely describing one call, the call descriptor id. - This structure is used to build an array of this structures - (call_desc[N_CALL_DESC]), which must be large enough to hold as many - calls as there are B channels in the system PLUS a reserve to be able - to handle incoming SETUP messages although all channels are in use. - - More, this structure contains the so called "link table pointers" - (isdn_link_t *ilt and drvr_link_t *dlt) which contain function pointers - to "link" a B-channel (better the addresses of functions each participant - needs to access each others functionality) after a successful call setup - to a userland driver (such as isp, ipr, rbch or tel) to exchange user - data in the desired protocol and format. - -Debugging control -================= - -(6) the device driver for /dev/i4bctl in conjunction with the userland - program isdndebug(8) is used to set the debug level for each of the - layers and several other parts of the system, information how to use - this is contained in i4b/i4b_debug.h and all parts of the kernel - sources. It is only usable for passive cards. - - -Layer 4 -======= - -(7) Layer 4 is "just" an abstraction layer used to shield the differences - of the various possible Layer 3 interfaces (passive cards based on - Siemens chip-sets, passive cards based on other chip-sets, active cards - from different manufacturers using manufacturer-specific interfaces) - and to provide a uniform interface to the isdnd userland daemon, which - is used to handle all the required actions to setup and close calls - and to the necessary retry handling and management functionality. - - Layer 4 communicates with the userland by using a well defined protocol - consisting of "messages" sent to userland and which are read(2) by the - isdnd. The isdnd in turn sends "messages" to the kernel by using the - ioctl(2) call. This protocol and the required messages for both - directions are documented in the i4b/i4b_ioctl.h file and are - implemented in files i4b_i4bdrv.c and i4b_l4.c, the latter also - containing much of the Layer 4 interface to the lower layers. - - i4b_l4mgmt.c contains all the required routines to manage the above - mentioned call descriptor id (cdid) in conjunction with the call - descriptor (array) and the call reference seen from layer 3. - - i4b_l4timer.c implements a timeout timer for Layer 4. - - -ISDN protocol trace -=================== - -(8) ISDN D-channel protocol trace for layers 2 and 3 is possible by using - hooks in the ISAC handling routines. - - In case D-channel trace is enabled, every frame is prepended with a - header containing further data such as a time stamp and sent via the - i4btrc driver found in driver/i4b_trace.c to one of the /dev/i4btrc<n> - devices, where <n> corresponds to a passive controller unit number. - - If desired, B-channel data can be made available using the same - mechanism - hooks in the HSCX handler send data up to the i4btrc - device. - - The raw data is then read by the isdntrace userland program which - decodes the layer 2 and/or layer 3 protocol and formats it to be - easily readable by the user. - - B-channel data is not interpreted but dumped as a hex-dump. - - -/* EOF */ diff --git a/share/examples/isdn/README b/share/examples/isdn/README deleted file mode 100644 index 0a817f1..0000000 --- a/share/examples/isdn/README +++ /dev/null @@ -1,342 +0,0 @@ - -$FreeBSD$ - --------------------------------------------------------------------------------- - - isdn4bsd - ======== - - Version 1.04.00 / August 2002 - - written by: - - Hellmuth Michaelis - Hallstrasse 20 - D-25462 Rellingen - - voice: +49 4101 473574 - fax: +49 4101 473575 - email: hm@freebsd.org - - ----- - - The isdn4bsd package is: - - Copyright (c) 1997, 2002 by Hellmuth Michaelis. All rights reserved. - - The standard FreeBSD license applies, for details see the file - /usr/share/examples/etc/bsd-style-copyright - - ----- - - isdn4bsd would not be what it is without - the help and support of many people, - see file ThankYou ! - - ----- - - Vote with your wallet: in case you want to buy new ISDN hardware, - buy it from manufacturers who support the development of i4b, - for a list of supporters have a look at file ThankYou! - - ----- - - This package is postcard-ware: - ============================== - - The (for laywer infected places: optional) license fee for using - isdn4bsd is sending a picture postcard of your home town. - My address can be found at the top of this file. - - --------------------------------------------------------------------------------- - -Contents: ---------- - 1. Disclaimer - 2. What is isdn4bsd ? - 3. Which BSD's are supported ? - 4. Which ISDN cards are supported ? - 5. Where do i find documentation for isdn4bsd ? - 6. How do i install isdn4bsd ? - 7. Where do i get support for isdn4bsd ? - 8. Where do i get commercial support for isdn4bsd ? - 9. How can i help and/or support isdn4bsd ? - 10. How do i report bugs ? - 11. Is there a mailing-list available for isdn4bsd ? - 12. Where can i get isdn4bsd ? - 13. What is the reward for reading everything in this file ? - - -1. Disclaimer: --------------- - - It may be illegal in your country to connect an isdn4bsd based machine - using a passive ISDN card to the ISDN at your site because the protocol - stack of isdn4bsd, which is necessary to run passive cards, has not been - approved by the telecommunication certification authority of your country. - If in doubt, please contact your local ISDN provider ! - - - THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - SUCH DAMAGE. - - -2. What is isdn4bsd ? ---------------------- - -Isdn4bsd (or in short i4b) is a package for interfacing a computer running -FreeBSD, NetBSD, OpenBSD or BSD/OS to the ISDN. - -The only ISDN protocol currently supported by the drivers for passive cards -is the BRI protocol specified in I.430, Q.921 and Q.931; better known as -DSS1 or Euro-ISDN. - -Other ISDN Protocols may be / are supported by the microcode of the supported -active ISDN cards. - -Isdn4bsd allows you to make IP network connections by using either IP packets -sent in raw HDLC frames on the B channel or by using built-in synchronous PPP -(or using userland ppp, this is experimental and only available for FreeBSD). - -For telephony, isdn4bsd can answer incoming phone calls like an answering -machine and now has preliminary dialout capabilities for voice and data calls. - - -3. Which BSD's are supported ? ------------------------------- - -FreeBSD: --------- - - FreeBSD-STABLE and FreeBSD-CURRENT is supported - by this version of isdn4bsd. - - I4b was integrated into FreeBSD in January 1999, so it is part - of the base FreeBSD system since FreeBSD 3.x. - - Please take the time to read the available documentation carefully. - - -NetBSD/i386: ------------- - The NetBSD specific support and the Diehl driver was written by - Martin Husemann, (martin@netbsd.org). Isdn4bsd was integrated - into the NetBSD tree in January 2001, please have a look at - http://www.de.netbsd.org/Documentation/network/isdn/ for more - information. - -NetBSD/Amiga: -------------- - The NetBSD/Amiga specific support was done by Ignatios Souvatzis, - (is@netbsd.org). - -NetBSD/Atari: -------------- - The NetBSD/Atari specific support was done by Leo Weppelman, - (leo@netbsd.org). - -NetBSD/Alpha: -------------- - This port is still experimental! - - The NetBSD/Alpha specific support was done by Jan-Hinrich Fessel, - (oskar@zippo.unna.ping.de) - -OpenBSD/i386: -------------- - Nikolay Sturm (sturm@physik.rwth-aachen.de) sent in patches to - support OpenBSD/i386 2.6, they are still experimental and since - i don't run OpenBSD i have no idea on the state of affairs. - -BSD/OS: -------- - The BSD/OS 4.0 specific support was done by Bert Driehuis. The - support is not yet complete. Please contact Bert directly in case - of questions regarding this at driehuis@playbeing.org. - - -4. Which ISDN cards are supported ? ------------------------------------ - - For a list of supported ISDN cards, please have a look at - the file "SupportedCards". - - Please have a look at the ReleaseNotes file ! - - -5. Where do i find documentation for isdn4bsd ? ------------------------------------------------ - -- in case you are upgrading from previous versions of isdn4bsd, have a - look at the ReleaseNotes file in the top level directory for major - changes and improvements. - -- For installation instructions have a look at the isdn4bsd handbook - available online at http://people.freebsd.org/~hm/i4b-home/ - -- isdn4bsd has a homepage at http://www.freebsd-support.de/i4b/ where i - will try to maintain links to docs, updates and errata. - -- Every program and every driver has a man page. - Hint: try "apropos isdn4bsd", it displays all available manual pages. - -- The file Overview contains a short technical overview of the inner - workings of isdn4bsd. - -- The file Resources contains URL's and ISBN's to more interesting ISDN - related stuff. - - -6. How do i install isdn4bsd ? ------------------------------- - -Read the installation instructions in the isdn4bsd handbook which is -available online at http://people.freebsd.org/~hm/i4b-home/ - -In case they are incomplete, unclear, wrong or outdated, please send me an -update for inclusion into a future distribution! - - -7. Where do i get support for isdn4bsd ? ----------------------------------------- - -Please send all questions regarding the installation, configuration -and setup of isdn4bsd to the isdn4bsd mailing list (see below). - -Please do not send me private mail asking for help with the installation, -configuration and setup of isdn4bsd: due to the amount of mail of this -type i'm no longer able to reply to those mails. - -Before sending mail asking for help, PLEASE (!) read the supplied -documentation, the examples, the handbook, the manual pages and the FAQ ! - -I will support and help with isdn4bsd as my time permits it. Please -keep in mind that in this case support is given on a voluntary basis -and your questions might not be answered immediately. - -Also, i strongly recommend subscribing to the mailing list mentioned below. - -Due to the experience gained supporting the predecessor of isdn4bsd, let -me please clearly state that there is no guarantee that your bug will be -fixed within some specific amount of time, in fact there is no guarantee -that your bug will be fixed at all; i'll do my best but there might be -more important things going on in my life than giving free support for -isdn4bsd. - -Some bugs seem to occur only in certain environments and are not -reproduceable here without access to the equipment you are connected -to or other equipment like ISDN simulators (which i don't get access to -for free): in this case you are the only person being able to trace down -the bug and fix it. - -There is a web page for i4b at http://www.freebsd-support.de/i4b/ available -where i will put bugfixes, updates and contributions. In particular it has -an "errata" page, where you should look in case you have problems with i4b. - - -8. Where do i get commercial support for isdn4bsd ? ----------------------------------------------------- - -In case you want to pay for support, maintenance, enhancements, extensions -to isdn4bsd or whatever else you may need, it is possible to hire me for -reasonable rates through my employer HCS GmbH; in this case please contact -me for details at hm@hcs.de and/or look at http://www.freebsd-support.de - - -9. How can i help and/or support isdn4bsd ? -------------------------------------------- - -Send a postcard! :-) - -I'm open for constructive suggestions, bugreports, fixes, patches, -enhancements and comments to improve isdn4bsd. - -Please send all questions regarding the installation, configuration -and setup of isdn4bsd to the isdn4bsd mailing list. - -Please send flames to /dev/null and/or start writing your own ISDN package. - -Isdn4bsd is a project on a voluntary basis and writing and supporting -communication systems like isdn4bsd costs much money and much time. - -Any contribution in terms of equipment, cards, documentation, cash -and/or daytime payed work on isdn4bsd will be highly appreciated! - -You can help by not only reporting bugs, but by sending in a patch for -the problem together with a bugreport. - -In case you cannot fix something yourself, please describe your problem -as detailed as possible, include information which version of an operating -system you are running, which ISDN board you are using, to which kind -of ISDN equipment (like the brand of PBX) you are connected etc. etc. - -In case you want to get a currently unsupported card supported, write a -low level driver for it yourself and submit it. In case you can't write -it yourself there is a good chance to get it supported if you can donate -one of those cards and - if at all possible - docs for it. - - -10. How do i report bugs ? --------------------------- - -Please submit patches ONLY as context diffs (diff -c)! - -I vastly prefer receiving bug fixes and enhancements that are clearly -differentiated. I don't always know what to do with large patches that -contain many bugs and enhances folded into the same context diffs. - -Please keep it to one fix or enhancement per patch! - -If your change modifies the external interface of an isdn4bsd program, -i.e. more config options, command-line switches, new programs, etc., -then please also include patches for the manual pages and documentation. - -Thank you! - - -11. Is there a mailing-list available for isdn4bsd ? ---------------------------------------------------- - -There is a mailing list available at - - freebsd-isdn@freebsd.org - -The list is maintained by majordomo, so i.e. to subscribe, -send a mail with the text - - subscribe freebsd-isdn - -in the message body sent to - - majordomo@freebsd.org - -This mailing list is NOT (!) FreeBSD specific, everyone is welcome there! - - -12. Where can i get isdn4bsd ? ------------------------------- - -The isdn4bsd package is part of FreeBSD since FreeBSD 3.0-RELEASE so you -get isdn4bsd where you can get FreeBSD: http://www.freebsd.org - -Isdn4bsd has its own homepage at - - http://www.freebsd-support.de/i4b/ - - - -13. What is the reward for reading everything in this file ? ------------------------------------------------------------- - -Have fun! -hellmuth diff --git a/share/examples/isdn/ROADMAP b/share/examples/isdn/ROADMAP deleted file mode 100644 index 33cc055..0000000 --- a/share/examples/isdn/ROADMAP +++ /dev/null @@ -1,86 +0,0 @@ - - Roadmap of isdn4bsd as integrated into FreeBSD - ============================================== - - $FreeBSD$ - - last edit-date: [Mon Aug 12 09:42:53 2002] - - -1. Documentation ---------------------- - - The i4b handbook which describes the setup and configuration of - isdn4bsd under FreeBSD in detail can be found at - http://people.freebsd.org/~hm/i4b-home/ - - The i4b homepage is http://www.freebsd-support.de/i4b/ - - The command "apropos isdn" will list all manpages available for - isdn4bsd. Two more manual pages of interest to syncronous PPP - over ISDN users are the pages for sppp and ispppcontrol. - - Under directory /usr/share/examples/isdn, you will find: - - FAQ - isdn4bsd Frequently Asked Questions - KERNEL - kernel config(8) file fragment to add ISDN support - Overview - short technical overview (outdated) - README - the original isdn4bsd README file - ROADMAP - this file - ReleaseNotes - list of major changes - Resources - where to get more information about ISDN - SupportedCards - list of supported ISDN cards - ThankYou - contributors to isdn4bsd - - contrib - contributed examples and code - v21 - V.21 (300Bd) soft modem emulator - - -2. Configuration ---------------------- - - Configuration of the isdn4bsd package consists of: - - - configuring a kernel suitable for running isdn4bsd. All - kernel configuration statements for isdn4bsd can be found - in the file /usr/src/sys/i386/conf/NOTES - another way to - get started is taking the GENERIC configuration file and - appending the KERNEL file mentioned above. - - - configuring the network interfaces iprX and/or ispX; the - former are used for "IP over raw HDLC" and the latter are - used for "sync PPP over ISDN". To configure the ipr- - interfaces, read the output of "man i4bipr", to configure - the isp-interfaces, read the output of "man i4bisppp", - "man sppp" and "man ispppcontrol" carefully. - - - writing a configuration file /etc/isdn/isdnd.rc for the - isdn daemon isdnd(8) which is responsible for the ISDN - call control mechanisms such as: dial on demand, dial - retry, dial recovery, timeout and short hold operation. - A sample (!) file can be found in /etc/isdn. Please read - the output of "man isdnd" and "man isdnd.rc" carefully. - - -2. Userland programs -------------------------- - - The userland programs can be found in the sourcetree under - /usr/src/usr.sbin/i4b and get installed under /usr/sbin. - - Isdntest will not be installed by default. - Isdnphone is experimental and may not run with your soundcard. - - -3. Kernel part -------------------- - - The kernel part of isdn4bsd can be found at /usr/src/sys/i4b. - - -4. Answering machine messages ----------------------------------- - - Messages to be used by the answering machine can be found in - /usr/share/isdn, you'll find the numbers 0 to 9, a beep and - a short announcement message here. diff --git a/share/examples/isdn/ReleaseNotes b/share/examples/isdn/ReleaseNotes deleted file mode 100644 index cf93e65..0000000 --- a/share/examples/isdn/ReleaseNotes +++ /dev/null @@ -1,196 +0,0 @@ -$FreeBSD$ - -ReleaseNotes for isdn4bsd last edit-date: [Mon Aug 12 09:47:59 2002] -================================================================================ - -release 1.04 --------------------------------------------------------------------------------- - -- add support properly displaying and logging incoming telephone numbers (MSNs) - by looking at the "type of number" field and providing configurable hooks - to correct the numbers accordingly. See keywords add-prefix, prefix-national - and prefix-international in isdnd.rc(5). - This feature was implemented by Christian Ullrich <chris@chrullrich.de> - -release 1.03 --------------------------------------------------------------------------------- - -- add support for Data over Voice (DoV) outgoing calls, see entry keywork - bcap in isdnd.rc(5). - based on patches received from Guy Ellis (guy@traverse.com.au), - Chris Collins (xfire@xware.cx) and Phillip Musumeci (phillip@cs.jcu.edu.au). - -release 1.02 --------------------------------------------------------------------------------- - -- add support for ISDN subaddressing written by Steve Looman - -- made ELSA PCC16 attach correctly (again ?) - -- fixed bug in CAPI support (patch from Juha-Matti Liukkonen <jml@cubical.fi>) - -- add support written by Steve Looman for the Compaq Microcom 610 ISDN card - (also known as Compaq series PSB2222I). - -release 1.01 --------------------------------------------------------------------------------- - - - add experimental support to send messages via the keypad facility to the - PBX or exchange office. The messages - if supported - may be used to - configure and maintain optional services offered by the PBX or exchange - office such as call deflection mailbox services. Please consult the - nice documentation for the exchange you are connected to. - - Currently keypad messages can be send by using the isdnphone utilities - "-k" switch on the command line. Don't forget to properly quote the - message in case it contains shell meta characters! - - - add keyword "maxconnecttime" to isdnd to prevent a potential telco bill - desaster. Caution: use only in conjunction with budgets to limit the number - of dials per timeunit otherwise you will get endless redials and reconnects! - -release 1.00 --------------------------------------------------------------------------------- - - - CAPI interface driver and AVM B1/T1 driver added. Both were written and - contributed by Juha-Matti Liukkonen <jml@cubical.fi> of Cubical Solutions - Ltd, Finnland. To support this, two new keywords were added to isdnd.rc: - "firmware" to be used in the controller section and "clone" to be used - in the entry section. - - -beta release 0.96 --------------------------------------------------------------------------------- - - - it is now possible to mark an entry as valid for a specified day of week - and a specific time range only to take advantage of some new tariff models. - Please see the new keywords "valid" and "holidayfile" in isdnd.rc(5). - This feature is considered experimental, use at your own risk! - - - keywords budget-callbacksfile and budget-calloutsfile added to isdnd's - entry section to write statistics information to a file - - - a driver for the Dynalink IS64PH is now available for FreeBSD 4.x and up - - -beta release 0.95 --------------------------------------------------------------------------------- - - - ITK ix1 micro ISA non-PnP card should now work for FreeBSD >= 4.0 - - - setting "dialretries = -1" in isdnd.rc gives an unlimited number - of dial retries for that entry. - - - the ELSA PCFpro ISDN card should now work for FreeBSD >= 4.0 - - - added new keywords (patch from Stefan Esser) to configure isppp - from within isdnd.rc. Documented in isdnd.rc(5), grep for "ppp-" - - - isppp VJ compression negotiation now run-time configurable using - keywords "enable-vj" / "disable-vj" with ispppcontrol - - - added new keywords to specify "budgets" for outbound calls in isdnd - to limit the number of possible calls within a given time period. - Runtime budget information and statistics are available in the isdnd - fullscreen menu display. - - - added new "ifpnp" AVM Fritz!Card PnP driver for FreeBSD >= 4.0 - contributed by Udo Schweigert. - - - added experimental hardware driver from Hans Petter Selasky for the - Teles 16.3c card based on the Cologne Chip Designs HFC-S 2BDS0 chip - called "ihfc". - notes for Teles 16.3c PnP and AcerISDN P10: For optimal performance: - -> please connect the card to the S0-bus before booting the computer. - -> do not change the cable you're using when first booted. - Other notes if the card does not work at all: - -> disconnect other isdn equipment on your S0-bus and - reboot your computer. - -> try changing the CLKDEL/stdel value for your card: - ../i4b/layer1-nb/ihfc/i4b_ihfc_pnp.c or - ../i4b/layer1/ihfc/i4b_ihfc_pnp.c - around line 100. The value can be in the range 0x0-0xf. - - - the FreeBSD >= 4.0 AVM Fritz PCI driver was moved to a separate layer 1 - driver called "ifpi". - - - the sppp subsystem was integrated into the i4bisppp/isp driver. There - is no need to include something like "option sppp" into your kernel - config file anymore. The spppcontrol utility is no longer usable to - configure the i4bisppp/isp driver, instead use the new ispppcontrol - utility! - - - FreeBSD >= 4.0: "iwic" driver for Winbond PCI ISDN chipset (W6692) - added, used i.e. in ASUSCOM P-IN100-ST-D and Dynalink IS64PPH. - - - added more protocol decoding to isdntrace - - - isntrace now adds a time/datestamp to the trace filename, signal USR1 - behaviour has changed, see manpage. - - - ispppcontrol now has a new option of setting the LCP timeout value - - - add directory mpd which contains docs and files on howto interface - i4b by using the netgraph subsystem to the multilink ppp daemon, mpd. - - - add i4bing, a raw HDLC B-channel interface to the NetGraph subsystem - - - add a V.21 modem emulator written by Poul-Henning Kamp - - - a new system configuration keyword "extcallattr" was added to isdnd - which allows to configure the display of the extended caller - attributes "screening indicator" and "presentation indicator" in - isdnd's log file. - - -beta release 0.90 --------------------------------------------------------------------------------- - - - the following cards are no longer supported for FreeBSD 4.0 and up: - - AVM Fritz!Card PnP - AVM Fritz!Card PCMCIA - Dynalink IS64PH - ITK ix1 Micro - USRobotics Sportster ISDN TA intern - - The AVM cards, the USR card and perhaps one of the ITK cards are likely - to be resurrected in the future, we just ran out of time, docs and/or - into programming problems for this release. - - - the rbch driver was enhanced to support the generation of accounting - information in HDLC mode. The bytecount and bps fields in isdnd - fullscreen mode now show meaningful information. - - - most of the layer1 drivers have been rewritten to support the new bus - and driver architecture for FreeBSD 4.0. - - - the ipr interfaces now support logging of some of the first ip packets - of a new connection and displaying them in the isdnd logs. To enable - this, add a line like: "options IPR_LOG=32" to your kernel config - file. The parameter to IPR_LOG specifies the number of packets to be - logged. - - - support for FreeBSD 2.x and FreeBSD 3.0-RELEASE has been removed. - The last beta release which supports this OS versions is i4b-0.83. - - - isdnd now recognizes two new keywords in the system section, mailto - and mailer. mailer is used to configure a mail program and is typically - set to /usr/bin/mail and mailto is set to the address of the isdnd - administrator. If both are set and a fatal error inside isdnd - happenes, mail is sent to the address in mailto with the error - message before isdnd terminates. - - - isdnd.rc now has an optional new "controller" section. This will be - used to specify different D-channel protocols in the future. It looks - like this: - - controller - protocol = dss1 # dss1 (default) or d64s (leased line) - - Please note that leased line support (d64s) is NOT yet functional! - - - isdnmonitor is now able to be used like isdnd in fullscreen mode from - a remote machine. - -EOF diff --git a/share/examples/isdn/Resources b/share/examples/isdn/Resources deleted file mode 100644 index c26aec0..0000000 --- a/share/examples/isdn/Resources +++ /dev/null @@ -1,82 +0,0 @@ -$FreeBSD$ - - -Bugfixes, improvements and patches for i4b -========================================== - - http://www.freebsd-support.de/i4b/ (in the "errata" section) - - -Standards: -========== - - ETSI - ---- - http://www.etsi.org/ - - ITU - --- - http://www.itu.ch/ - - ftp://ftp.leo.org/pub/comp/doc/standards/itu/ - - CAPI - ---- - http://www.capi.org/ - - -ISDN Chips -========== - - Infineon (formerly Siemens) - --------------------------- - http://www.infineon.com/ - - Cologne Chip Design - ------------------- - http://www.colognechip.de/ - - Winbond - ------- - http://www.winbond.com/ - - -SunShine Project - Implementation of the ISDN recommendations Q.921 & Q.931 -=========================================================================== - - http://www.tcm.hut.fi/~bos/ISDN/sunshine/SunShine.html - -Books: -====== - - "ISDN: concepts, facilities and services", - Gary C. Kessler, McGraw-Hill 1993, - ISBN 0-07-034247-4 - - "Integrated services digital networks: architectures, protocols, standards", - Herman J. Helgert, Addison-Wesley 1991, - ISBN 0-201-52501-1 - - "ISDN and Broadband ISDN with Frame Relay and ATM", - William Stallings, Prentice Hall 1995, - ISBN 0-02-415513-6 - - "Technik der Netze", - Gerd Siegmund, R. v. Decker's Verlag 1996, - ISBN 3-7685-2495-7 - - "Euro-ISDN fuer Anwender und Techniker" - Reinhard Heermeyer und Maria Spath, Festo DIDACTIC 1996, - ISBN 3-8127-4334-5 - - "ISDN implementors guide: standards, protocols & services", - Charles K. Summers, McGraw-Hill 1995, - ISBN 0-07-069416-8 - - "PPP Design and Debugging", - James Carlson, Addison-Wesley 1998, - ISBN 0-0201-18539-3 - - "ISDN - Die Technik", - Andreas Kanbach, Andreas Koerber, Huethig Verlag 1999, - ISBN 3-7785-2288-4 diff --git a/share/examples/isdn/SupportedCards b/share/examples/isdn/SupportedCards deleted file mode 100644 index 1c47002..0000000 --- a/share/examples/isdn/SupportedCards +++ /dev/null @@ -1,196 +0,0 @@ --------------------------------------------------------------------------------- - - ISDN cards supported by isdn4bsd in FreeBSD - =========================================== - - last edit-date: [Sun Oct 21 11:09:24 2001] - - $FreeBSD$ - --------------------------------------------------------------------------------- - - YES - card is generally supported for this OS - NO - card is NOT supported for this OS - EXP - card is in an experimental status for this OS - DEV - card driver is under development - ??? - card status is unknown for this OS - - -1. Passive non-PnP ISA bus ISDN cards -===================================== - - Type FreeBSD Notes - --------------------- ------- ----------------------- - AVM A1 YES - AVM Fritz!CardClassic YES - Creatix ISDN-S0/8 YES (= Teles S0/8 ) - Creatix ISDN-S0/16 YES ( = Teles S0/16 ) - Dr.Neuhaus Niccy 1008 YES ( = Teles S0/8 ) - Dr.Neuhaus Niccy 1016 YES ( = Teles S0/16 ) - ELSA PCC-16 YES - ELSA PCFpro YES - ITK ix1 micro YES (Note 13) - Stollmann Tina-pp YES - Teles S0/8 YES - Teles S0/16 YES - Teles S0/16.3 YES - 3Com/USR SportsterInt YES ( = Stollmann Tina-pp ) - TELEINT ISDN SPEED EXP (Note 4) - - -2. Passive PnP ISA bus ISDN cards -================================= - - Type FreeBSD Notes - --------------------- ------- ----------------------- - AVM Fritz!Card PnP YES (Note 1) - Asuscom I-IN100-ST-DV ??? ( = Dynalink IS64PH ) - Asuscom ISDNlink 128K YES (Note 16) - Creatix ISDN-S0 PnP YES (Note 2) - Dr.Neuhaus Niccy GO@ YES (Note 2) - Dynalink IS64PH YES (Note 11) - ELSA 1000pro ISA YES (Note 3) - ITK ix1 micro V.3 YES (Note 13) - Sagem Cybermod YES (= Niccy GO@ ) - Sedlbauer Win Speed YES (Note 9) - Siemens I-Surf 2.0 YES (Note 15) - Teles S0 PnP YES (Note 5) - Teles 16.3c EXP (Note 4) - AcerISDN P10 EXP (Note 4) - Compaq Microcom 610 YES ( = Compaq series PSB2222I ?) - - -3. Passive PCI bus ISDN cards -============================= - - Type FreeBSD Notes - --------------------- ------- ----------------------- - ASUSCOM P-IN100-ST-D YES - AVM Fritz!Card PCI YES (Note 14) - AVM Fritz!Card PCI V2 YES (Note 14) - Dynalink IS64PPH YES - Dynalink IS64PPH+ YES - ELSA 1000pro PCI YES ( = ELSA Microlink PCI ) - Teles PCI-TJ YES - NETJet-S YES - Winbond W6692-based YES - - -4. Passive PCMCIA bus ISDN cards -================================ - - Type FreeBSD Notes - --------------------- ------- ----------------------- - AVM Fritz!Card PCMCIA NO (Note 10) - ELSA ISDN/MC NO - ELSA MC/ALL NO - - -5. Passive Zorro2 ISDN cards for the Amiga -========================================== - - Type FreeBSD Notes - --------------------- ------- ----------------------- - ISDN Blaster NO (Note 12, Amiga/NetBSD) - ISDN Master NO (Note 12, Amiga/NetBSD) - ISDN Master II NO (Note 12, Amiga/NetBSD) - - -6. Active ISDN cards -==================== - - Type (active, ISA) FreeBSD Notes - --------------------- ------- ----------------------- - AVM B1 YES (Note 17) - AVM T1 YES (Note 18) - DiehlS,SX,SCOM,QUATRO NO (Note 7) - Miro P1 DEV ( = Tina-dd ) - Stollmann Tina-dd DEV (Note 8) - - -7. Notes -======== - - -Note 1: The driver for the Fritz!Card PnP was developed by Udo Schweigert - (ust@cert.siemens.de) who develops under FreeBSD only. - Please contact Udo in case of trouble. - -Note 2: The NetBSD version has not been verified to work yet. - -Note 3: Due to its design, this card produces 128 IRQs/sec. This can be - reportedly stopped by disconnecting pin 12 of the 7474 and wiring - it to pin 15 of the 74175. Be careful! This procedure has not been - verified and doing this will immediately terminate your warranty !! - The card will not function anymore with drivers for other OSes and - you may not get any further support from the manufacturer! YMMV! - -Note 4: This driver was developed by Hans Petter Selasky, hselasky@c2i.net - The code is still somewhat experimental. - -Note 5: The card has only been verified to work under FreeBSD 4.0 and up. - -Note 6: This driver is currently under development by Gary Jennejohn who - develops under FreeBSD only. - -Note 7: This driver is currently under construction by Martin Husemann who - develops under NetBSD only. - -Note 8: This driver is currently under development by Hellmuth Michaelis who - develops under FreeBSD only. - -Note 9: This driver was developed by German Tischler, tanis@gaspode.franken.de. - Please contact him in case of trouble. The "Teledat 100" sold by the - german Telekom is identical with this card. - -Note 10: This driver is developed by Matthias Apitz, matthias.apitz@sisis.de. - Please contact him in case of trouble. Please read the file - misc/README.PCCARD in the i4b distribution for additional installation - instructions. - -Note 11: This driver was developed by Martijn Plak (martijn@be3.com) - This driver might also work for Asuscom cards. (Andrew Gordon - wrote: Just to let you know that I've now tried the i4b "dynalink" - driver with the ASUSCOM I-IN100-ST-DV card, and it appears to work - fine.) - - Note: This driver is now unsupported as Martijn is no longer able - to maintain this driver. - - The BSD/OS support for this card was written by Bert Driehuis. - - Ported to FreeBSD newbus by Kazunori Fujiwara <fujiwara@rcac.tdi.co.jp> - -Note 12: This driver was developed by Ignatios Souvatzis (is@netbsd.org) - Please contact him in case of trouble. - This driver is supposed to work on the ISDN Master versions and - lookalikes, like the ISDN Blaster, and on the ISDN Master II. - Note that the ISDN Master II does not AutoConfig(tm)ure in the - DraCo Zorro bus and thus only works in real Amigas. This is no - i4b problem, but general. - -Note 13: This driver was developed by Martin Husemann, please contact him - in case of trouble. The FreeBSD PnP support for version 3 of the - card was done by Philippe Guezou <Philippe.Guezou@wanadoo.fr>. - -Note 14: This driver was developed by Gary Jennejohn who develops under - FreeBSD only. In case of problems with this driver, please contact - him directly at garyj@jennejohn.org. - -Note 15: The driver for the Siemens I-Surf 2.0 was developed by Udo Schweigert - (ust@cert.siemens.de) who develops under FreeBSD only. - Please contact Udo in case of trouble. - -Note 16: The driver for the Asuscom ISDNlink 128K PnP was developed by - Ari Suutari (ari@suutari.iki.fi). Please contact Ari directly - in case of trouble with this driver. - -Note 17: The driver was written by Juha-Matti Liukkonen <jml@cubical.fi>, - Cubical Solutions Ltd. I have tested it with an AVM B1 PCI card - V.4.0 and an AVM B1 ISA card V.2.0. - -Note 18: The driver was written by Juha-Matti Liukkonen <jml@cubical.fi>, - Cubical Solutions Ltd. I have no access to any PRI equipment at - all so i have not tested the driver, feedback welcome! - -EOF diff --git a/share/examples/isdn/ThankYou b/share/examples/isdn/ThankYou deleted file mode 100644 index 3ad4cb0..0000000 --- a/share/examples/isdn/ThankYou +++ /dev/null @@ -1,289 +0,0 @@ -$FreeBSD$ - -Thanks a lot for postcards from: --------------------------------- - - Aachen - Arnhem - Arolsen - Bad Rothenfelde - Berlin - Birenbach - Bochum - Bohnsdorf - Bonn - Bornheim - Braunschweig - Darmstadt - Delft - Dresden - Eggstaett am Hartsee - Flekkefjord - Freiburg - Habichtswald - Hamburg (2) - Ihlow - Jena - Kassel - Koengen - Kymgbuk, Korea - Landsberg - Leiden - Magdeburg - Mauerbach - Mersch - Middelburg - Mosi-Oa-Tunya - Muenchen (4) - Netherlands (Leo) - Netherlands (Peter) - Rio de Janeiro - Saint-Gilles-Croix-de-Vie - Scheessel - Siena, Italy - St. Jacob - Stuttgart - Travemuende - Vedskoelle, Danmark - Windach - Wuerzburg - Zuberec - - -I would like to thank the following people and organisations: -------------------------------------------------------------- - -Gary Jennejohn for his constant kind support while writing isdn4bsd - during that year. Gary always runs the latest and - greatest FreeBSD-current and makes isdn4bsd run - there, if his root fs is intact, of course! :-). - In February 1999, Gary contributed the AVM Fritz! - Card PCI driver to isdn4bsd. - -Martin Husemann is a major contributor to isdn4bsd. He wrote almost - all of the NetBSD support for isdn4bsd, the monitor - network code and the Diehl driver. He constantly - tries put strange macros into i4b ... ;-) - -Serge Vakulenko for writing the sppp driver and making it freely - available. - -Joerg Wunsch for adapting the synchronous PPP stuff to i4b. - Gary finished this and integrated the PPP stuff into - current isdn4bsd. - -Wolfgang Helbig for many patches, polishing isdn4bsd and layer 1 - debugging. - -Thomas Halenbeck and -Stephan Forth of FORTH EDV in Mainz donated two AVM A1 card and - one AVM B1 card to support the development and - maintenance of drivers for this cards. Thomas donated - three more AVM A1 cards in the meantime - Thank you! - -Arne Helme for the initial work on how to support IOM-2 based - boards. - -Andrew Gordon for disassembling an old AVM A1 and documenting it. - Andrew added VJ header compression to the ipr interface - and is a constant source of various hints and - suggestions :-) - Andrew sent in a Teles S0/16 PnP for FreeBSD newbus - conversion, thanks a lot! - -Juergen Krause and someone who does not want to be mentioned anymore - for the work on the first ISDN package for FreeBSD. - -Michael Elbel for supporting the development with ftp/www/mail - resources. - -Leo Weppelman for the port to the NetBSD/Atari platform. - -Bas Oude Nijeweme for the port to OpenBSD/i386 2.2. - -German Tischler for the driver for the Sedlbauer WinSpeed card, - for the PnP support for FreeBSD and for constant - testing and contributions. German did the initial - mostly complete conversion of the layer1 code - to the FreeBSD 4.0 new-bus driver architecture! - -Matthias Apitz for the driver for the AVM PCMCIA Fritz!Card. - -Martijn Plak for the Dynalink driver. - -Ignatios Souvatzis for the NetBSD/Amiga port and associated driver(s). - -Christoph Weber-Fahr donated an AVM B1 card to support development of a - driver. Thanks a lot, Christoph! - -Eivind Eklund for the PnP support for FreeBSD, for __FreeBSD_version - and more. - -Karsten Keil author of the hisax isdn4linux driver for some details - about the one or the other piece of hardware. - -Bert Driehuis for the support of the BSDI BSD/OS 4.0 operating system - -Barry Scott for fixed charging units shorthold mode support (as - used in the UK by British Telecom). - -Poul-Henning Kamp for the work on DTMF decoding and many hints, fixes - and suggestions. - -Stefan Bethke for the work on the audio format conversion stuff in - the telephony paths. - -Udo Schweigert for PCMCIA support and work on FreeBSD 2.2x - compatibility. Udo contributed the AVM Fritz PnP - and the Siemens I-Surf V2.0 driver. - -Ernst Winter donated a Fritz!Card PCI which was used to develop - and test the driver. - -Harald Frank long-term loan of an ISDN Blaster board. - -Klaus Burkert for a loan of an ISDN Master II. - -Ari Suutari for a driver for the Asuscom ISDNlink ISA PnP card - -Brian Somers for working on making userland ppp work with i4b - -Rune Knapstad for good help with the port to OpenBSD/i386 2.5 - -Uwe Laverenz for the donation of an ELSA PCC-16 card - -Luke Roberts for the long time loan a Dynalink ISDN intern PCI card - -Marc van Kempen for the donation of a Dynalink ISDN intern PCI card - -Christoph Kukulies for the donation of an ITK ix1 card - -Nikolay Sturm sent in patches to get OpenBSD 2.6 supported. - -Dave Boyce wrote a driver for the Winbond W6692 PCI ISDN - chip which eventually lead to a layer 1 reorg. - -Hans Petter Selasky for his contribution of a driver for the - Teles 16.3c card (and the complete ihfc driver). - -Sergio de Souza Prallon for the contribution of the itjc driver which - supports the NETJet-S and the Teles PCI-TJ cards - -Steve Looman for the driver for a Compaq Microcom 610 ISDN card - and for the subaddressing implementation - -Christian Ullrich for the "type of number" patchset - - - ------------------------------------------ - - -Liebscher & Partner Martin Welk and Holm Tiffe sent in a motivating - BSD daemon plushie :-) - -Abaid Andreas Mutschlechner of Abaid, Alte Strasse 2, in - I-39017 Schenna (BZ) donated money to support i4b - development, which was used to upgrade my main test - machine for isdn4bsd from an 486 to a Pentium II. - Thank you very, very much, Andreas ! - -3Com USRobotics Christian Weissgerber of 3Com USRobotics in Munich - donated a passive "Sportster ISDN TA intern" ISDN - card and complete hardware documentation for the card. - - Florian Uhl of 3Com in Munich donated two MC68SC302 - "3Com U.S.Robotics ISDN Card PnP internal" cards and - documentation to support writing a driver for this - card. - -Dr. Neuhaus Klaus Muehle of Dr. Neuhaus Telekommunikation in - Hamburg sent documentation for the NICCY GO@ and - NICCY EASY@ ISDN cards to support development of - a driver for this cards. - -Stollmann Many thanks to Christian Luehrs and Manfred Jung - for giving out docs and sources to support the - driver development for the tina-dd active card. - -ELSA Axel Riemer of ELSA AG in Aachen donated several - ISA, PCI and PC-Card ISDN boards to three developers - and provided support and documentation to help with - adding support to i4b for this hardware. Werner Fehr - of ELSA answered our technical questions and gave - valuable hints. Thanks also to Andreas Klemm for - making the contact ;-) - -Cologne Chip Design Harald Schaefer of Cologne Chip Design send in a - HFC-S-PCI developer card, complete docs and - layer 1 example code to support the development - of a driver for that chipset! Thanks a lot! - -ASUSCOM Network Inc. Mr. Ben Chen of Asuscom sent a Winbond based PCI - card and a Cologne Chip Design based PCI card to - support the development of device drivers. - -Cubical Solutions Ltd. Juha-Matti Liukkonen <jml@cubical.fi> of Cubical - contributed the CAPI layer and the AVM B1/T1 device - driver to isdn4bsd. - -AVM GmbH Mr. A. Ziessnitz of AVM donated an AVM B1 PCI cards - to support development and maintenance of a driver - for this card. - -Intelligent Network Technology Ltd. - David Hedley provided an AVM Fritz!Card PCI Version 2 - controller to support development of a driver. - - - -The following people contributed in one or the other way to isdn4bsd: ---------------------------------------------------------------------- - - Alexander Langer - Andreas Haakh - Andreas Lohrum - Arve Ronning - Aurelien Bargy - Bart van Leeuwen - Caspar Schlegel - Chris Collins - Christian Wolf - Christoph Kukulies - Daniel Rock - David Wetzel - Dirk Meyer - Doobee R. Tzeck - Dominik Brettnacher - Gabor Dolla - Guy Ellis - H. Eckert - Hans Huebner - Harald Hanche-Olsen - Harold Gutch - Heiko Schaefer - Jan Sparud - Joachim Kuebart - Joakim Hernberg - Juha-Matti Liukkonen - Julian H. Stacey - Kazunori Fujiwara - Lars Koeller - Malte Lance - Marcel Moolenaar - Martin Recktenwald - Meike Aulbach - Michael Hohmuth - Michael Ranner - Michael Reifenberg - Nils Ulltveit-Moe - Paul Herman - Paul Sijben - Phillip Musumeci - Philippe Guezou - Rob Pickering - Stefan Esser - Stefan Herrmann - Steven Looman - Wolfgang Solfrank - -(In case i forgot someone, please tell me!) diff --git a/share/examples/isdn/contrib/README b/share/examples/isdn/contrib/README deleted file mode 100644 index ae5969f..0000000 --- a/share/examples/isdn/contrib/README +++ /dev/null @@ -1,42 +0,0 @@ -$FreeBSD$ - -This directory contains various unsupported contributions to isdn4bsd ---------------------------------------------------------------------- - -anleitung.ppp Anleitung für syncPPP Internet-Zugang und - Anrufbeantworter / FreeBSD 2.2.x / Teles.S0/16.3-Karte - (stefan@asterix.webaffairs.net) - -answer.c answering machine in C by David Wetzel - (dave@turbocat.de) - -answer.sh a much better replacement for answer, tell and record - from Stefan Esser (se@freebsd.org) - -convert.sh convert recorded message to WAV format, optionally - send it via mail. from Stefan Herrmann - (stefan@asterix.webaffairs.net) - -hplay.c isdn4bsd telephony output driver for the "rsynth" - package to play synthetic speech to a telephone - connection - -i4b-ppp-newbie.txt setup PPP for isdn4bsd for newbies text from - Dominik Brettnacher <domi@saargate.de> (german) - -isdnctl This script can control the state of your ISDN line. - It counts how many scripts/users currently use the - ISDN line and uses "ifconfig down" if noone uses it - any more. Alexander Langer <alex@big.endian.de> - -isdnd_acct the barebones isdnd accounting script - -isdnd_acct.pl enhanced accounting from Joachim Kuebart - (joki@kuebart.stuttgart.netsurf.de) - -isdntelmux.c a "record while play" program contributed by - Michael Reifenberger (Michael@Reifenberger.com) - -mrtg-isp0.sh shell script and mrtg config entry to display - callout and callback statistics with mrtg - (www.mrtg.org) using the budget file statistics diff --git a/share/examples/isdn/contrib/anleitung.ppp b/share/examples/isdn/contrib/anleitung.ppp deleted file mode 100644 index 01466e2..0000000 --- a/share/examples/isdn/contrib/anleitung.ppp +++ /dev/null @@ -1,142 +0,0 @@ -$FreeBSD$ - -i4b Anleitung für syncPPP Internet-Zugang und Anrufbeantworter -unter FreeBSD 2.2.x mit Teles.S0/16.3-Karte -=============================================================== - -by Stefan Herrmann <stefan@asterix.webaffairs.net> - - -Installation ------------- -1) Neues Verzeichnis "/usr/src/i4b" anlegen. - -2) Ins Verzeichnis "/usr/src/i4b" wechseln und Sourcen entpacken. - -3) Ins Verzeichnis "FreeBSD" wechseln und den Befehl "sh install.sh ausführen: - z.B. "root@asterix[0]/usr/src/i4b/FreeBSD # sh install.sh" - - Wenn auf eine neuere Version von i4b gewechselt wird, zuerst - "sh uninstall.sh" ausführen, dann erst "sh install.sh" - -4) Dann ins Verzeichnis "/usr/src/i4b" (zurück-)wechseln und die Befehle - "make depend", "make" und "make install" ausführen. - -5) Nun muß der kernel mit neuen Optionen versehen werden. Dazu wird an die - Kernel-Konfigurationsdatei im Verzeichnis "/sys/i386/conf" folgendes ans - Ende hinzugefügt: - -# i4b passive ISDN cards support (isic - I4b Siemens Isdn Chipset driver) -# note that the ``options'' and ``device'' lines must BOTH be defined ! - -# Teles S0/16.3 -options "TEL_S0_16_3" -device isic0 at isa? port 0xd80 net irq 5 flags 0x04 vector isicintr - -# i4b passive cards D channel handling -# Q.921 -pseudo-device "i4bq921" -# Q.931 -pseudo-device "i4bq931" - -# common passive and active layer 4 -# layer 4 -pseudo-device "i4b" - -# userland driver to do ISDN tracing (for passive cards oly) -pseudo-device "i4btrc" 4 -# userland driver to control the whole thing -pseudo-device "i4bctl" -# userland driver for access to raw B channel -pseudo-device "i4brbch" 4 -# userland driver for telephony -pseudo-device "i4btel" 2 -# network driver for IP over raw HDLC ISDN -pseudo-device "i4bipr" 4 -# enable VJ header compression detection for ipr i/f -options IPR_VJ -# network driver for sync PPP over ISDN -pseudo-device "i4bisppp" 4 -pseudo-device sppp 4 - -6) Danach wird der kernel durch Eingabe der Befehle "make depend", "make" und - "make install" im Verzeichniss "/usr/src/sys/compile/<CONFIG>" neu - übersetzt und installiert. - -7) Nach dem Booten kann man dann mit dem Befehl "dmesg" überprüfen, ob die - Karte korrekt erkannt wurde und alle erforderlichen Treiber installiert - sind. - - -Konfiguration -------------- -8) Die Konfiguration von i4b wird hauptsächlich im Verzeichnis "/etc/isdn" - druchgeführt, dort sucht der isdnd beim Start auch seine Konfigurations- - datei "isdnd.rc". Da vorgenanntes Verzeichnis nach der Installation aber - noch leer ist, kopiert man zuerst die Beispieldateien aus dem Verzeichnis - "/etc/isdn/samples" nach "/etc/isdn". - -9) Die Datei "isdnd.rc" enthält schon recht aussagekräftige Kommentare zu den - einzelnen Optionen, weitere Informationen erhält man mit "man isdnd.rc" und - "man isdnd". - -10) Für syncPPP und Anrufbeantworter sind nur die Sektionen "SYSTEM", - "telephone answering" und "example for sPPP" notwendig, die Sektion - "IP over ISDN example" kann dafür also entfernt werden. - -11) Für den automatisierten Start des isp0 Interfaces und des isdnd erstellt - man nun ein Start-Skript. Dazu kopiert man die Datei - "/usr/src/i4b/etc/rc.isdn-PPP" nach "/etc/rc.isdn" und paßt sie - entsprechend an. Man beachte hierbei auch die FAQ "/usr/src/i4b/FAQ", die - Tips für die richtige Eintragung der IP-Adressen bereithält. - -12) Der Anrufbeantworter wird dadurch aktiviert, daß das entsprechende - Programm, das in "/etc/isdn/isdnd.rc" hinter dem Eintrag "answerprog = " - steht, aufgerufen wird. Wird dort kein Pfad angegeben, wird das Programm - im Verzeichniss "/etc/isdn" erwartet. Beispiele solcher Programme findet - man wiederum im Verzeichnis "/etc/isdn/samples". Sie nennen sich - - "answer" Nur Ansagetext abspielen, keine Aufzeichnungsmöglichkeit. - "record" Ansage wird abgespielt, nach Piep-Ton kann gesprochen - werden. - "tell" Als Ansagetext wird die anrufende Nummer gesprochen, keine - Aufzeichnung. - "tell-record" Anrufende Nummer als Ansagetext, nach Piep-Ton kann ge- - sprochen werden. - "isdntel.sh" Ansagetext und Aufzeichnung; mittels dem Programm "isdntel" - hat man die Kontrolle übe die Aufzeichnungen im Ver- - zeichniss "/var/isdn". Siehe auch "man isdntel" und - "man isdntelctl". - - Diese Programme müssen an die eigenen Wünsche angepaßt werden. Leider gibt es - kein mitgeliefertes Programm, mit dem man so auch den Ansagetext aufsprechen - kann. Das ist aber nicht allzuschlimm, da man nur das Programm "record" dafür - etwas anpassen muß (Ansagetexte beep und msg auskommentieren). Damit die Anrufe - aufgezeichnet werden können, muß zuerst noch das Verzeichnis "/var/isdn" - angelegt werden. Dort werden dann alle Aufzeichnungen obiger Programme gespeichert. - -13) Man sollte sich auch noch die man-Pages der Programme "isdnd", "isdnctl", - "isdnd_acct", "isdndebug" und "isdntrace" zu Gemüte führen. - - -Betrieb -------- -14) Der syncPPP Zugang zum Provider wird einfach mit dem Aufruf von - "/etc/rc.isdn" initialisiert. Jegliche Aktivitäten ins Internet (also z.B. - ein "ping 141.1.1.1") starten die Verbindung. Wenn in "/etc/isdn/isdnd.rc" - beim Eintrag "unitlengthsrc = " "rate" angegeben wurde, wird die Verbindung - kurz bevor die nächste Einheit begonnen wird, beendet. Informationen über - die Einheiten werden aus der Datei "/etc/isdn/isdnd.rates" ausgelesen - (Beispiele sind in "/etc/isdn/samples"). - - Mit "/etc/rc.isdn [restart|stop]" kann i4b entweder neu gestartet (z.B. zum - Einlesen der geänderten Konfiguration aus "isdnd.rc") oder beendet werden. - -15) Für den Anrufbeantworter muß nur der "isdnd" gestartet sein. Ein - ankommender Anruf wird dann automatisch angenommen (je nach den Einträgen - in "/etc/isdn/isdnd.rc"). - -16) Informationen über die Verbindung erhält man sowohl in "/var/log/messages", - also auch in "/var/log/isdnd.log" (so der isdnd mit der Option "-l" - gestartet wird) bzw. auf dem aktuellen tty (wenn der isdnd mit der Option - "-f" gestartet wird). diff --git a/share/examples/isdn/contrib/answer.c b/share/examples/isdn/contrib/answer.c deleted file mode 100644 index aac431f..0000000 --- a/share/examples/isdn/contrib/answer.c +++ /dev/null @@ -1,178 +0,0 @@ -// $FreeBSD$ -// changed ".g711a" to ".al" (-hm) -// Tue Mar 3 02:42:14 MET 1998 dave@turbocat.de -// started - -#define BLK_SIZE 2048 -#define SOX "/usr/local/bin/sox" -#define ALAWULAW "/usr/local/bin/alaw2ulaw" - -#include <stdio.h> -#include <time.h> - - FILE *device; - FILE *logfile; - char srcNum[30]; - char destNum[30]; - char argbuf[255]; - char tmpBuf[1024] = ""; - - -void writeToPhone (char *path) -{ - char buf[BLK_SIZE]; - FILE *srcfile; - int i = 0; - int readcount = 0; - - srcfile = fopen(path,"r"); - if (srcfile) { - for (i=0;i<BLK_SIZE;i++) { - buf[i] = '\0'; - } - readcount = BLK_SIZE; - i = 0; - do { - readcount = fread(buf,1, BLK_SIZE, srcfile); - fwrite(buf, 1, readcount, device); - i = readcount + i; -// fprintf(logfile,"%d read (%d)\n",i,readcount); - } while (readcount == BLK_SIZE); - - fclose(srcfile); - } else { - fprintf(logfile,"Can't open file '%s'\n",path); - } -} - -void readFromPhone (char *path) -{ - char buf[BLK_SIZE]; - FILE *destfile; - int i = 0; - int readcount = 0; - - destfile = fopen(path,"a"); - if (destfile) { - for (i=0;i<BLK_SIZE;i++) { - buf[i] = '\0'; - } - readcount = BLK_SIZE; - i = 0; - do { - readcount = fread(buf,1, BLK_SIZE, device); - fwrite(buf, 1, readcount, destfile); - i = readcount + i; -// fprintf(logfile,"%d read (%d)\n",i,readcount); - } while (readcount == BLK_SIZE); - - fclose(destfile); - } else { - fprintf(logfile,"Can't open file '%s'\n",path); - } -} - -void usage (void) -{ - fprintf(stderr,"usage: answer -D device -d destination -s source\n"); - exit(1); -} - -const char * argWithName (const char* aName) -{ - // '-D /dev/null -d 82834 -s 3305682834' - int i = 0; - int optionSeen = 0; - int startpos = 0; - - for (i = 0; i < sizeof(tmpBuf);i++) { - tmpBuf[i] = '\0'; - } - - for (i = 0; i<strlen(argbuf);i++) { - if (optionSeen) { - for (;(i<strlen(argbuf) && (argbuf[i] != ' '));i++) { - } - i++; - startpos = i; - - for (;(i<strlen(argbuf) && (argbuf[i] != ' '));i++) { - } - strncpy(tmpBuf,&argbuf[startpos], i-startpos); - - return tmpBuf; - } - if (0 == strncmp(aName,&argbuf[i], strlen(aName))) { - optionSeen = 1; - } - } - - usage(); - return NULL; -} - -int main (int argc, const char *argv[]) { - - int i,pos = 0; - extern char *optarg; - extern int optind; - int bflag, ch; - char timeStr[50]; - char outfileName[1024] = ""; - char cmdStr[2048] = ""; - time_t now; - - now=time(NULL); - - strftime(timeStr,40,I4B_TIME_FORMAT,localtime(&now)); - - logfile = fopen("/var/log/answer.log","a"); - - fprintf(logfile,"%s Started\n",timeStr); - - pos=0; - for (i=1;i<argc;i++) { - sprintf(&argbuf[strlen(argbuf)],"%s ",argv[i]); - } - if (strlen(argbuf) > 2) { - argbuf[strlen(argbuf)-1] = '\0'; - } - - - device = fopen(argWithName("-D"),"r+"); - strcpy(destNum, argWithName("-d")); - strcpy(srcNum, argWithName("-s")); - - fprintf(logfile,"device '%s'\n", argWithName("-D")); - fprintf(logfile,"srcNum '%s'\n", srcNum); - fprintf(logfile,"destNum '%s'\n", destNum); - - - if (device) { - - strftime(timeStr,40,I4B_TIME_FORMAT,localtime(&now)); - - sprintf(outfileName,"/var/isdn/%s_%s_%s", timeStr, srcNum, destNum); - - writeToPhone ("/usr/local/lib/isdn/msg.al"); - readFromPhone (outfileName); - - sprintf(cmdStr,"/bin/cat %s | %s | %s -t raw -U -b -r 8000 - -t .au %s.snd", outfileName, ALAWULAW, SOX, outfileName); - fprintf(logfile,"%s\n",cmdStr); - system(cmdStr); - unlink(outfileName); - - fclose(device); - } else { - fprintf(logfile,"Can't open file '%s'\n",argWithName("-D")); - } - - now=time(NULL); - - strftime(timeStr,40,I4B_TIME_FORMAT,localtime(&now)); - - fprintf(logfile,"%s Done\n",timeStr); - fclose(logfile); - exit(0); // insure the process exit status is 0 - return 0; // ...and make main fit the ANSI spec. -} diff --git a/share/examples/isdn/contrib/answer.sh b/share/examples/isdn/contrib/answer.sh deleted file mode 100644 index 34073d3..0000000 --- a/share/examples/isdn/contrib/answer.sh +++ /dev/null @@ -1,111 +0,0 @@ -#!/bin/sh -#--------------------------------------------------------------------------- -# -# answer script for i4b isdnd -# --------------------------- -# -# last edit-date: [Fri May 25 15:21:05 2001] -# -# $FreeBSD$ -# -#--------------------------------------------------------------------------- -VARDIR=/var/isdn -LIBDIR=/usr/local/lib/isdn -LOGFILE=/tmp/answer.log - -NCALLFILE=$VARDIR/ncall -DATE=`date +%d%H` - -progname=${0##*/} -set -- $@ # have to split argument string !!! - -# ---------------------------------------------------------------------- - -usage () -{ - echo "usage: $progname -D device -d dest -s src" - exit 1 -} - -ncall () -{ - nfile=$1 - [ -f $nfile ] && read n < $nfile || n=0 - echo $(($n + 1)) > $nfile - printf "%.4d" $n -} - -# ---------------------------------------------------------------------- - -while getopts "D:d:s:" opt -do - case $opt - in -D) DEVICE=$OPTARG ;; -d) DEST=$OPTARG ;; -s) SRC=$OPTARG ;; - esac -done - -[ -c "$DEVICE" -a -n "$DEST" -a -n "$SRC" ] || usage; - -shift $(($OPTIND - 1)) - -# ---------------------------------------------------------------------- - -NCALL=`ncall $NCALLFILE` - -echo "$progname: device $DEVICE destination $DEST source $SRC " >>$LOGFILE - -{ - echo "Date: "`date` - echo "From: \"$SRC\"" - echo "To: \"$DEST\"" - echo -} >> $VARDIR/I.$NCALL.$DATE - -# ---------------------------------------------------------------------- - -tellnumber () -{ - number=$1 - digits=`echo $number | sed -e 's/\(.\)/\1 /g'` - - files="" - for digit in $digits - do - files="$files $LIBDIR/$digit.al" - done - cat $files -} - -# ---------------------------------------------------------------------- - -do_answer () -{ - [ -f $LIBDIR/beep.al ] && cat $LIBDIR/beep.al - [ -f $LIBDIR/msg.al ] && cat $LIBDIR/msg.al - [ -f $LIBDIR/beep.al ] && cat $LIBDIR/beep.al -} > $DEVICE - -do_record () -{ - cat $DEVICE > $VARDIR/R.$NCALL.$DATE -} - -do_tell () -{ - [ -f $LIBDIR/beep.al ] && cat $LIBDIR/beep.al - [ -f $LIBDIR/msg.al ] && cat $LIBDIR/msg.al - tellnumber $SRC - [ -f $LIBDIR/beep.al ] && cat $LIBDIR/beep.al -} > $DEVICE - -# ---------------------------------------------------------------------- - -case $progname -in -answer) do_answer ;; -record) do_answer; do_record ;; -tell) do_tell ;; -esac diff --git a/share/examples/isdn/contrib/convert.sh b/share/examples/isdn/contrib/convert.sh deleted file mode 100644 index b4a6e7d..0000000 --- a/share/examples/isdn/contrib/convert.sh +++ /dev/null @@ -1,86 +0,0 @@ -#!/bin/sh -# -# convert recorded message to WAV format, optionally send it via mail -# -# by: Stefan Herrmann <stefan@asterix.webaffairs.net> -# Date: Fr 22 Mai 1998 14:18:40 CEST -# -# $FreeBSD$ - -CAT=/bin/cat -RM=/bin/rm -SOX=/usr/local/bin/sox -ALAW2ULAW=/usr/local/bin/alaw2ulaw -MAIL=/usr/bin/mail -GZIP=/usr/bin/gzip -ZIP=/usr/local/bin/zip -UUENCODE=/usr/bin/uuencode - -inputfile="" -outfilename="" -mailto="" -iF=0 -oF=0 -mF=0 - -set -- `getopt i:o:m: $*` - -if test $? != 0 -then - echo 'Usage: r2w -i <input file> -o <outfile name>.wav -m <email address>' - exit 1 -fi - -for i -do - case "$i" - in - -i) - inputfile=$2 - iF=1 - shift - shift - ;; - -o) - outfilename=$2 - oF=1 - shift - shift - ;; - -m) - mailto=$2 - mF=1 - shift - shift - ;; - --) - shift - break - ;; - esac -done - -if [ $iF -eq 0 -o $oF -eq 0 ] -then - echo 'Usage: r2w -i <input file> -o <outfile name>.wav -m <email address>' - exit 1 -fi - -if [ $iF -eq 1 -a $oF -eq 1 ] -then - echo - echo "converting $inputfile to $outfilename.wav ..." - - $CAT $inputfile | $ALAW2ULAW | $SOX -t raw -U -b -r 8000 - -t .wav $outfilename.wav -fi - -if [ $iF -eq 1 -a $oF -eq 1 -a $mF -eq 1 ] -then - echo "... and sending it via email to $mailto ..." - $UUENCODE $outfilename.wav message.wav | $MAIL -s"new message $outfilename" $mailto && $RM $outfilename.wav - # only usefull when sending over the internet - #$GZIP -c $outfilename.wav | $UUENCODE message.zip | $MAIL -s"Nachricht vom ISDN Anrufbeantworter" $mailto && $RM $outfilename.wav -fi - -echo "done." -echo diff --git a/share/examples/isdn/contrib/hplay.c b/share/examples/isdn/contrib/hplay.c deleted file mode 100644 index 763e5a8..0000000 --- a/share/examples/isdn/contrib/hplay.c +++ /dev/null @@ -1,241 +0,0 @@ -/*---------------------------------------------------------------------------* - * - * rsynth driver to output to - * - an open isdn4bsd telephone connection or - * - an output file or - * - the /dev/audio device - * ---------------------------------------------------------------- - * - * tested with rsynth-2.0 - * - * written by Hellmuth Michaelis (hm@kts.org) - * - * last edit-date: [Fri May 25 15:21:33 2001] - * - * $FreeBSD$ - * - *---------------------------------------------------------------------------*/ - -#include <config.h> -#include <useconfig.h> -#include <stdio.h> -#include <math.h> -#include <errno.h> -#include <ctype.h> -#include <fcntl.h> -#include <sys/file.h> -#include <sys/stat.h> -#include <sys/param.h> -#include <sys/signal.h> -#include <sys/ioctl.h> - -#include <i4b/i4b_tel_ioctl.h> - -#include "proto.h" -#include "getargs.h" -#include "hplay.h" -#include "l2u.h" - -#define SAMP_RATE 8000 -long samp_rate = SAMP_RATE; - -char *prog = "hplay"; - -static int use_audio = 1; -static int use_isdn = 0; -static int unit_no = 0; - -static int audio_fd = -1; -static int isdn_fd = -1; -static int file_fd = -1; - -char *audio_dev = "/dev/dsp"; -char *isdn_dev = "/dev/i4btel"; -static char *ulaw_file = NULL; - -int -audio_init(int argc, char *argv[]) -{ - char dev[64]; - int format = CVT_ALAW2ULAW; - - prog = argv[0]; - - argc = getargs("FreeBSD audio/i4b/file output driver",argc, argv, - "a", NULL, &use_audio, "use /dev/audio (default)", - "i", NULL, &use_isdn, "use /dev/i4btel", - "u", "%d", &unit_no, "/dev/i4btel unit number (def = 0)", - "f", "", &ulaw_file, "u-law output to file", - NULL); - - if(help_only) - return argc; - - if(ulaw_file) - { - if(strcmp(ulaw_file, "-") == 0) - { - file_fd = 1; /* stdout */ - } - else - { - file_fd = open(ulaw_file, O_WRONLY | O_CREAT | O_TRUNC, 0666); - if(file_fd < 0) - fprintf(stderr, "ERROR: cannot open %s, error = %s\n", ulaw_file, strerror(errno)); - } - } - - if(use_isdn) - { - sprintf(dev, "%s%d", isdn_dev, unit_no); - - if((isdn_fd = open(dev, O_WRONLY)) < 0) - { - fprintf(stderr, "ERROR: cannot open %s, error = %s\n", dev, strerror(errno)); - } - - if((ioctl(isdn_fd, I4B_TEL_SETAUDIOFMT, &format)) < 0) - { - fprintf(stderr, "ioctl I4B_TEL_SETAUDIOFMT failed: %s", strerror(errno)); - } - } - - if(use_audio) - { - audio_fd = open(audio_dev, O_WRONLY | O_NDELAY); - if(audio_fd < 0) - { - fprintf(stderr, "ERROR: cannot open %s, error = %s\n", audio_dev, strerror(errno)); - } - } - - return argc; -} - -void -audio_term() -{ - int format = CVT_NONE; - - if(isdn_fd >= 0) - { - if((ioctl(isdn_fd, I4B_TEL_SETAUDIOFMT, &format)) < 0) - { - fprintf(stderr, "ioctl I4B_TEL_SETAUDIOFMT failed: %s", strerror(errno)); - } - close(isdn_fd); - isdn_fd = -1; - } - - if(audio_fd >= 0) - { -#if 0 - ioctl(audio_fd, SNDCTL_DSP_SYNC, &dummy); -#endif - close(audio_fd); - audio_fd = -1; - } - - if(file_fd >= 0) - { - close(file_fd); - file_fd = -1; - } -} - -void -audio_play(int n, short *data) -{ - int ret; - unsigned char *p; - - if (n > 0) - { - unsigned char *converted = (unsigned char *) malloc(n); - int i; - - if(converted == NULL) - { - fprintf(stderr, "Could not allocate memory for conversion\n"); - exit(3); - } - - for (i = 0; i < n; i++) - { - converted[i] = short2ulaw(data[i]); - } - - if (isdn_fd >= 0) - { - p = converted; - errno = 0; - - while((ret = write(isdn_fd, p, n)) != n) - { - if(!errno) - { - p += ret; - if(p > (converted + n)) - break; - } - else - { - fprintf(stderr, "write /dev/i4btel ERROR: ret (%d) != n (%d), error = %s\n", ret, n, strerror(errno)); - break; - } - } - } - - for (i = 0; i < n; i++) - converted[i] = (data[i] - 32768) / 256; - - if(audio_fd >= 0) - { - p = converted; - - errno = 0; - - while((ret = write(audio_fd, p, n)) != n) - { - if(!errno) - { - p += ret; - if(p > (converted + n)) - break; - } - else - { - fprintf(stderr, "write /dev/dsp ERROR: ret (%d) != n (%d), error = %s\n", ret, n, strerror(errno)); - break; - } - } - } - - if(file_fd >= 0) - { - int ret; - p = converted; - - errno = 0; - - while((ret = write(file_fd, p, n)) != n) - { - if(!errno) - { - p += ret; - if(p > (converted + n)) - break; - } - else - { - fprintf(stderr, "write file ERROR: ret (%d) != n (%d), error = %s\n", ret, n, strerror(errno)); - break; - } - } - } - - free(converted); - } -} - -/* EOF */ diff --git a/share/examples/isdn/contrib/i4b-ppp-newbie.txt b/share/examples/isdn/contrib/i4b-ppp-newbie.txt deleted file mode 100644 index 7d6c4b0..0000000 --- a/share/examples/isdn/contrib/i4b-ppp-newbie.txt +++ /dev/null @@ -1,237 +0,0 @@ -$FreeBSD$ - - PPP mit isdn4bsd - _________________________________________________________________ - - Version 1.01 - Datum: 22.02.1999 - Autor: [1]Dominik Brettnacher <domi@saargate.de> - - - Anmerkungen und Verbesserungsvorschläge sind willkommen - - - 1. vorab - Dieser Text soll Neulingen helfen, sich mittels isdn4bsd und BSD - per PPP z.B. bei ihrem Provider einwählen zu können. - isdn4bsd bringt einiges an Dokumentation und - Konfigurationsbeispielen mit, jedoch ist es nicht immer leicht, - die entsprechenden Hinweise gut miteinander zu kombinieren, so daß - am Schluß das dabei herauskommt, was man haben möchte. - 2. Wo bekomme ich isdn4bsd? - hier solle es keine allzu großen Probleme geben: isdn4bsd ist auf - dem FTP-Server [2]ftp.consol.de erhältlich. Man beachte dabei, daß - man sich nicht, wie üblich, als anonymous, sondern als isdn4bsd - einloggen muß. Benutzer von Browsern geben als Adresse - [3]ftp://isdn4bsd@ftp.consol.de und als Passwort ihre - eMail-Adresse an. - Wertvolle Informationen findet man in der Datei README. - 3. Welche ISDN-Karten werden unterstützt? - Informationen darüber findet man in der README-Datei. - 4. Ich benutze einen externen ISDN-Adapter - was nun? - Externe Adapter benötigen keine direkte Unterstützung, weil sie - über die serielle Schnittstelle angesteuert werden. Man kann also - das normale PPP benutzen. man ppp hilft hier sicher weiter. - 5. isdn4bsd installieren - Wie man isdn4bsd installiert, steht in der Datei - FreeBSD/INSTALLATION (für NetBSD und OpenBSD analog). Eine - Beispielkonfiguration des Kernel sieht so aus: -[...] -# -# i4b passive ISDN cards support (isic - I4b Siemens Isdn Chipset driver) -# note that the ``options'' and ``device'' lines must BOTH be defined ! -# -# Non-PnP Cards: -# -------------- -# -# AVM A1 or AVM Fritz!Card -options "AVM_A1" -device isic0 at isa? port 0x300 net irq 15 flags 4 vector isicintr -# -# ISDN Protocol Stack -# ------------------- -# -# Q.921 / layer 2 - i4b passive cards D channel handling -pseudo-device "i4bq921" -# -# Q.931 / layer 3 - i4b passive cards D channel handling -pseudo-device "i4bq931" -# -# layer 4 - i4b common passive and active card handling -pseudo-device "i4b" -# -# ISDN devices -# ------------ -# -# userland driver to do ISDN tracing (for passive cards only) -pseudo-device "i4btrc" 4 -# -# userland driver to control the whole thing -pseudo-device "i4bctl" -# -# userland driver for access to raw B channel -#pseudo-device "i4brbch" 4 -# -# userland driver for telephony -#pseudo-device "i4btel" 2 -# -# network driver for IP over raw HDLC ISDN -#pseudo-device "i4bipr" 4 -# enable VJ header compression detection for ipr i/f -#options IPR_VJ -# -# network driver for sync PPP over ISDN -pseudo-device "i4bisppp" 1 -pseudo-device sppp 1 -# -#--------------------------------------------------------------------------- -[...] - Nachdem ein neuer Kernel kompiliert und das System neugestartet - wurde, kann es weiter gehen. - 6. Konfiguration isdnd.rc - Die für ISDN wichtigste Konfigurationsdatei ist - /etc/isdn/isdnd.rc. Mit man isdnd.rc erhält man Informationen über - die Einstellungen, die man dort vornehmen kann. Im Folgenden ein - Beispiel: - - -#============================================================================== -# SYSTEM section: isdnd global configuration parameters -#============================================================================== -system - -# accounting -# ---------- - -acctall = on # generate info for everything -acctfile = /var/log/isdnd.acct # name & location of accounting file -useacctfile = yes # generate accouting info to file - -# monitor -# ------- - -monitor-allowed = no # global switch: monitor on/off -monitor-port = 451 # default monitor TCP port - -# Monitor rights are granted due to the most specific host/net spec, i.e. in -# the example below host 192.168.1.2 will have the rights specified on that -# line, even so it belongs to net 192.168.1.0/24 as well. -# -# A monitor specification may either be: -# -# - the name of a local (UNIX-domain) socket; this MUST start with a "/" -monitor = "/var/run/isdn-monitor" -monitor-access = fullcmd -monitor-access = channelstate, logevents -monitor-access = callin, callout - -# ratesfile -# --------- - -ratesfile = /etc/isdn/isdnd.rates # name & location of rates file - -# regular expression pattern matching -# ----------------------------------- - -#regexpr = "connected.*KTS" # look for matches in log messages -#regprog = connectKTS # execute program when match is found - -# realtime priority section -# ------------------------- - -rtprio = 25 # modify isdnd's process priority - -############################################################################### -entry -name = lf -usrdevicename = isp -usrdeviceunit = 0 -isdncontroller = 0 -isdnchannel = -1 -local-phone-incoming = 012345678 -remote-phone-incoming = 876543210 -local-phone-dialout = 012345678 -remote-phone-dialout = 876543210 -remdial-handling = first -dialin-reaction = accept -dialout-type = normal -b1protocol = hdlc -idletime-incoming = 240 -idletime-outgoing = 30 -earlyhangup = 5 -ratetype = 0 -unitlength = 90 -unitlengthsrc = rate -dialretries = 3 -dialrandincr = on -recoverytime = 25 - -connectprog = is-up -disconnectprog = is-down - - Wichtig sind hier für den Neuling die vier *-phone-* Einträge, die - jeweils die lokale Rufnummer und die der Gegenstelle für ein- und - ausgehende Verbindungen angeben. - - 7. ISDN-Verbindungen aufbauen - um ISDN-Verbindungen aufzubauen, bedarf es einiger Befehle, die - beim Systemstart aufgerufen werden. Man kann sie zum Beispiel am - Ende von /etc/rc.local unterbringen. Hier gibt es aber durchaus - noch andere Lösungen: - [...] - # start ISDN - echo -n 'ppp / ISDN...' - echo -n 'isdnd...' - /usr/local/bin/isdnd - echo -n 'ifconfig...' - ifconfig isp0 link1 0.0.0.0 1.1.1.1 netmask 0xffffff00 - ifconfig isp0 down - echo -n 'sppp...' - spppcontrol isp0 myauthproto=pap myauthname="xxx" - myauthsecret="xxx" hisauthproto=none - echo -n 'ifconfig...' - ifconfig isp0 up - echo -n 'setting routes...' - route add default -interface isp0 - echo '.' - Ändern muß man hier eventuell die Zieladresse des Providers (im - Beispiel 1.1.1.1). Man bekommt diese entweder vom Provider, oder - aber man muß einen Versuch daransetzen, sie selbst herauszufinden. - Wie das funktioniert, steht in der Datei FAQ des isdn4bsd-Paketes. - Auch am Aufruf von spppcontrol (Vorsicht: spppcontrol bis - hisauthproto=none ist eine Zeile!) muß noch etwas umgestellt - werden: - + myauthproto steht für das Authentifizierungsprotokoll. - Möglich sind pap oder chap. - + myauthname ist der PPP-Benutzername. - + myauthsecret ist das PPP-Kennwort. - Wenn man nun die Befehle in /etc/rc.local ausführt, kann man mit - einem ping auf eine beliebige Adresse außerhalb des lokalen Netzes - eine Verbindung öffnen. Sie wird automatisch nach einiger - Inaktivität (siehe isdnd.rc) wieder geschlossen. - - 8. Es funktioniert nicht - was kann ich tun? - Es gibt einige Möglichkeiten zur Fehlerdiagnose: - + dmesg gibt Aufschluß darüber, ob die Karte richtig erkannt - wurde. - + ifconfig (siehe rc.local) kann mit dem Parameter debug - aufgerufen werden und gibt dann einiges an Informationen aus. - + die Nachrichten in /var/log/messages können außerdem - hilfreich sein - - 9. wer kann mir helfen? - + die erste Adresse für ISDN-Probleme ist die Mailingliste - [4]freebsd-isdn@freebsd.org - man bestellt sie, indem man - eine Mail mit dem Text subscribe freebsd-isdn an - [5]majordomo@freebsd.org schickt. - + auch die deutschsprachige Mailingliste kann hilfreich sein. - Mit einer Mail an [6]majordomo@de.freebsd.org, die im Text - subscribe de-bsd-questions enthält bestellt man sie. - _________________________________________________________________ - -References - - 1. mailto:domi@saargate.de - 2. ftp://isdn4bsd@ftp.consol.de/ - 3. ftp://isdn4bsd@ftp.consol.de/ - 4. mailto:freebsd-isdn@freebsd.org - 5. mailto:majordomo@freebsd.org - 6. mailto:majordomo@de.freebsd.org diff --git a/share/examples/isdn/contrib/isdnctl b/share/examples/isdn/contrib/isdnctl deleted file mode 100644 index 57fab45..0000000 --- a/share/examples/isdn/contrib/isdnctl +++ /dev/null @@ -1,111 +0,0 @@ -#!/bin/sh - -# isdnctl -# Control the ISDN line based on usage -# -# This script can control the state of your ISDN line. It counts -# how many scripts/users currently use the ISDN line and uses -# "ifconfig down" if noone uses it any more. -# I use this script for cronjobs that fetch mail and news and run cvsup. -# If I'm still using the line, the script won't close the connection, -# but if not, it saves a lot of phone costs. -# -# ---------------------------------------------------------------------------- -# "THE BEER-WARE LICENSE" (Revision 42, (c) Poul-Henning Kamp): -# Alexander Langer <alex@big.endian.de> wrote this file. As long as you retain -# this notice you can do whatever you want with this stuff. If we meet some -# day, and you think this stuff is worth it, you can buy me a beer in return. -# -# Alexander Langer -# ---------------------------------------------------------------------------- -# -# $FreeBSD$ -# - - -usage () { - echo "usage: $0 [-i interface] [-f /path/to/users.file] [up|down|show]" -} - -# Defaults -INTERFACE=isp0 -USERSFILE= - -# Getopt stuff -args=`getopt i:f: $*` -if [ $? != 0 ]; then - usage - exit 2 - fi -set -- $args -for i; do - case "$i" in - -i) - INTERFACE="$2" - shift; shift - ;; - -f) - USERSFILE="$2" - shift; shift - ;; - --) - shift - break - ;; - esac -done - -if [ -z $USERSFILE ]; then - USERSFILE=/var/run/isdn.users.$INTERFACE -fi - -if [ -z $1 ]; then - usage - exit 2 -fi - -# Does Usersfile exist? -if [ ! -f $USERSFILE ]; then - # Try to create it - if ! /sbin/ifconfig $INTERFACE | grep "^$INTERFACE.*<UP," > /dev/null; then - echo "0" > $USERSFILE || exit 1 - else - echo "1" > $USERSFILE || exit 1 - fi -elif [ ! -w $USERSFILE ]; then - echo "Error: $USERSFILE not writeable!" - exit 1 -fi - -if ! /sbin/ifconfig $INTERFACE | grep "^$INTERFACE.*<UP," > /dev/null; then - if ! cat $USERSFILE | grep '^0$' > /dev/null ; then - echo "Interface down, removing number from file"; - echo "0" > $USERSFILE - fi; -fi; - -case "$1" in - show) - echo "`cat $USERSFILE` users online" - ;; - up) - expr `cat $USERSFILE` + 1 > $USERSFILE - /sbin/ifconfig $INTERFACE up - echo "`cat $USERSFILE` users online" - ;; - down) - if cat $USERSFILE | grep '^0$' > /dev/null ; then - echo "Already down" - exit 0 - fi - expr `cat $USERSFILE` - 1 > $USERSFILE - if cat $USERSFILE | grep '^0$' > /dev/null ; then - echo "`cat $USERSFILE` users online, interface down" - /sbin/ifconfig $INTERFACE down - exit 0 - fi - echo "`cat $USERSFILE` users online" - ;; -esac - -exit 0 diff --git a/share/examples/isdn/contrib/isdnd_acct b/share/examples/isdn/contrib/isdnd_acct deleted file mode 100644 index 21223b7..0000000 --- a/share/examples/isdn/contrib/isdnd_acct +++ /dev/null @@ -1,137 +0,0 @@ -#!/usr/bin/perl -#--------------------------------------------------------------------------- -# -# Copyright (c) 1996, 1998 Hellmuth Michaelis. All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. - -# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -# SUCH DAMAGE. -# -#--------------------------------------------------------------------------- -# -# accounting report script for the isdnd daemon accounting info -# ------------------------------------------------------------- -# -# last edit-date: [Fri May 25 15:28:20 2001] -# -# $FreeBSD$ -# -#--------------------------------------------------------------------------- - -# where the isdnd accounting file resides -$ACCT_FILE = "/var/log/isdnd.acct"; - -# the charge for a unit, currently 0,12 DM -$UNIT_PRICE = 0.12; - -# open accounting file -open(IN, $ACCT_FILE) || - die "ERROR, cannot open $ACCT_FILE !\n"; - -# set first thru flag -$first = 1; - -# process file line by line -while (<IN>) -{ - # remove ( and ) from length and bytecounts - tr/()//d; - - # split line into pieces - ($from_d, $from_h, $dash, $to_d, $to_h, $name, $units, $secs, $byte) - = split(/ /, $_); - - # get starting date - if($first) - { - $from = "$from_d $from_h"; - $first = 0; - } - - # split bytecount - ($inb, $outb) = split(/\//, $byte); - - # process fields - $a_secs{$name} += $secs; - $a_calls{$name}++; - $a_units{$name} += $units; - $a_charge{$name} += $units * $UNIT_PRICE; - $a_inbytes{$name} += $inb; - $a_outbytes{$name} += $outb; - $a_bytes{$name} = $a_bytes{$name} + $inb + $outb; -} - -# close accouting file -close(IN); - -# write header -print "\n"; -print " ISDN Accounting Report ($from -> $to_d $to_h)\n"; -print " =====================================================================\n"; - -#write the sum for each interface/name -foreach $name (sort(keys %a_secs)) -{ - $o_secs = $a_secs{$name}; - $gt_secs += $o_secs; - $o_calls = $a_calls{$name}; - $gt_calls += $o_calls; - $o_units = $a_units{$name}; - $gt_units += $o_units; - $o_charge = $a_charge{$name}; - $gt_charge += $o_charge; - $o_inbytes = $a_inbytes{$name}; - $gt_inbytes += $o_inbytes; - $o_outbytes = $a_outbytes{$name}; - $gt_outbytes += $o_outbytes; - $o_bytes = $a_bytes{$name}; - $gt_bytes += $o_bytes; - write; -} - -$o_secs = $gt_secs; -$o_calls = $gt_calls; -$o_units = $gt_units; -$o_charge = $gt_charge; -$o_inbytes = $gt_inbytes; -$o_outbytes = $gt_outbytes; -$o_bytes = $gt_bytes; -$name = "Total"; - -print "======= ====== ===== ===== ======== ============ ============ ============\n"; -write; - -print "\n\n"; -exit; - -# top of page header -format top = - -Name charge units calls secs inbytes outbytes bytes -------- ------ ----- ----- -------- ------------ ------------ ------------ -. - -# record template -format STDOUT = -@<<<<<< @##.## @#### @#### @####### @########### @########### @########### -$name, $o_charge, $o_units, $o_calls, $o_secs, $o_inbytes, $o_outbytes, $o_bytes -. - -# EOF diff --git a/share/examples/isdn/contrib/isdnd_acct.pl b/share/examples/isdn/contrib/isdnd_acct.pl deleted file mode 100644 index 0306216..0000000 --- a/share/examples/isdn/contrib/isdnd_acct.pl +++ /dev/null @@ -1,258 +0,0 @@ -#!/usr/bin/perl -# -#ich habe zwei vielleicht n?tzliche Erweiterungen an isdn_pacct -#gemacht: -# -# 1) Man kann den Namen der Accounting-Datei angeben. Ich -# habe Accounting-Files nach Telekom-Rechnung aufgeteilt -# und kann diese so sehr sch?n nachvollziehen. -# -# 2) Die Abrechnung wird nach Einheitenl?ngen aufgelistet. -# Leider wird zur Zeit immer Nahzone verwendet (isdnd.rates -# wird ausgelesen), und Feiertage stehen als erstes auf -# der TODO-Liste. Wenn man dieses Feature durch einen -# Switch anschaltet, kann man es sogar unauff?llig in die -# Distribution aufnehmen. -# -# Mir hilft diese Abrechnung, an mir zu arbeite und mehr -# Tests und Zug?nge nachts durchzuf?hren... Aber die meisten -# Einheiten werden immer noch im 90s-Takt verbraucht :-( -# -# $FreeBSD$ -# -#--------------------------------------------------------------------------- -# -# Copyright (c) 1994, 1996 Hellmuth Michaelis. All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# 3. All advertising materials mentioning features or use of this software -# must display the following acknowledgement: -# This product includes software developed by Hellmuth Michaelis -# 4. Neither the name of the author nor the names of any co-contributors -# may be used to endorse or promote products derived from this software -# without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -# SUCH DAMAGE. -# -#--------------------------------------------------------------------------- -# -# accounting script for the isdn daemon accounting info -# ----------------------------------------------------- -# -# last edit-date: [Fri May 25 15:22:26 2001] -# -# -hm my first perl program :-) -# -hm sorting the output -# -hm adding grand total -# -#--------------------------------------------------------------------------- - -sub wday { - local ($y, $m, $d) = @_; - local ($nday, @mon); - - @mon = (0, 31, 61, 92, 122, 153, 184, 214, 245, 275, 306, 337); -# M A M J J A S O N D J F - - if ($m > 2) { - $m -= 3; - } else { - $m += 9; - $y--; - } - if ($y < 1600) { - return -1; - } - $y -= 1600; - $nday = $y * 365 + $mon[$m] + $d + - int($y / 4) - int($y / 100) + int($y / 400); - ($nday + 2) % 7; -} - -# where the isdnd accounting file resides -if ($#ARGV == 0) { - $ACCT_FILE = $ARGV[0]; -} else { - $ACCT_FILE = "/var/log/isdnd.acct"; -} - -# $PERIOD_FILE = "/usr/local/etc/isdnd.periods"; -# # read periods that need to be separately listed -# if (open(IN, $PERIOD_FILE)) { -# while (<IN>) { -# chop; -# ($start, $end) = split(/ /); -# push(@p_start, $start); -# push(@p_end, $end); -# } -# close(IN); -# } - -$RATES_FILE = "/etc/isdn/isdnd.rates"; -if (open(IN, $RATES_FILE)) { - while(<IN>) { - chop; - if (! /^ra0/) { - next; - } - ($ra0, $day, $rest) = split(/[ \t]+/, $_, 3); - @periods = split(/[ \t]+/, $rest); - foreach $period (@periods) { - ($h_start, $m_start, $h_end, $m_end, $secs) = - $period =~ /(.+)\.(.+)-(.+)\.(.+):(.+)/; - for ($h = int($h_start); $h < $h_end; $h++) { - $secs{$day, $h} = $secs; - } - } - } - close(IN); -} - -# the charge for a unit, currently 0,12 DM -$UNIT_PRICE = 0.12; - -# open accounting file -open(IN, $ACCT_FILE) || - die "ERROR, cannot open $ACCT_FILE !\n"; - -# set first thru flag -$first = 1; - -# process file line by line -while (<IN>) -{ - # remove ( and ) from length and bytecounts - tr/()//d; - - # split line into pieces - ($from_d, $from_h, $dash, $to_d, $to_h, $name, $units, $secs, $byte) - = split(/ /, $_); - - # get starting date - if($first) - { - $from = "$from_d $from_h"; - $first = 0; - } - - # split bytecount - ($inb, $outb) = split(/\//, $byte); - - # if user wants to account time periods, put this to the right - # slot(s) - ($hour, $minute, $second) = split(/:/, $from_h); - ($day, $mon, $year) = split(/\./, $from_d); - $day = &wday('19' . $year, $mon, $day); - if ($secs{$day, int($hour)}) { - $secs = $secs{$day, int($hour)}; - # process fields - $p_secs{$name, $secs} += $secs; - $p_calls{$name, $secs}++; - $p_units{$name, $secs} += $units; - $p_charge{$name, $secs} += $units * $UNIT_PRICE; - $p_inbytes{$name, $secs} += $inb; - $p_outbytes{$name, $secs} += $outb; - $p_bytes{$name, $secs} = $p_bytes{$name, $secs} + $inb + $outb; - } - - # process fields - $a_secs{$name} += $secs; - $a_calls{$name}++; - $a_units{$name} += $units; - $a_charge{$name} += $units * $UNIT_PRICE; - $a_inbytes{$name} += $inb; - $a_outbytes{$name} += $outb; - $a_bytes{$name} = $a_bytes{$name} + $inb + $outb; -} - -# close accouting file -close(IN); - -# write header -print "\n"; -print " ISDN Accounting Report ($from -> $to_d $to_h)\n"; -print " =================================================================\n"; - -#write the sum for each interface/name -foreach $n (sort(keys %a_secs)) -{ - $o_secs = $a_secs{$n}; - $gt_secs += $o_secs; - $o_calls = $a_calls{$n}; - $gt_calls += $o_calls; - $o_units = $a_units{$n}; - $gt_units += $o_units; - $o_charge = $a_charge{$n}; - $gt_charge += $o_charge; - $o_inbytes = $a_inbytes{$n}; - $gt_inbytes += $o_inbytes; - $o_outbytes = $a_outbytes{$n}; - $gt_outbytes += $o_outbytes; - $o_bytes = $a_bytes{$n}; - $gt_bytes = $o_bytes; - $name = $n; - write; - - foreach $i (keys %p_secs) { - ($nam, $secs) = split(/$;/, $i); - if ($nam ne $n) { - next; - } - $o_secs = $p_secs{$i}; - $o_calls = $p_calls{$i}; - $o_units = $p_units{$i}; - $o_charge = $p_charge{$i}; - $o_inbytes = $p_inbytes{$i}; - $o_outbytes = $p_outbytes{$i}; - $o_bytes = $p_bytes{$i}; - $name = sprintf(' %5.1fs', $secs / 10); - write; - } -} - -$o_secs = $gt_secs; -$o_calls = $gt_calls; -$o_units = $gt_units; -$o_charge = $gt_charge; -$o_inbytes = $gt_inbytes; -$o_outbytes = $gt_outbytes; -$o_bytes = $gt_bytes; -$name = "Total"; - -print "======= ====== ===== ===== ======== ============ ============ ============\n"; -write; - -print "\n\n"; -exit; - -# top of page header -format top = - -Name charge units calls secs inbytes outbytes bytes -------- ------ ----- ----- -------- ------------ ------------ ------------ -. - -# record template -format STDOUT = -@<<<<<< @##.## @#### @#### @####### @########### @########### @########### -$name, $o_charge, $o_units, $o_calls, $o_secs, $o_inbytes, $o_outbytes, $o_bytes -. - -# EOF diff --git a/share/examples/isdn/contrib/isdntelmux.c b/share/examples/isdn/contrib/isdntelmux.c deleted file mode 100644 index 1d517a7..0000000 --- a/share/examples/isdn/contrib/isdntelmux.c +++ /dev/null @@ -1,197 +0,0 @@ -/* - * Copyright (c) 1999 Michael Reifenberger (Michael@Reifenberger.com). - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - *--------------------------------------------------------------------------- - * - * i4btemux - record while playing - * =============================== - * - * $FreeBSD$ - * - *----------------------------------------------------------------------------*/ - -#include<stdio.h> -#include<stdarg.h> -#include<signal.h> -#include<errno.h> -#include<string.h> -#include<stdlib.h> -#include<unistd.h> -#include<fcntl.h> -#include<ctype.h> -#include<sys/stat.h> -#include<sys/wait.h> -#include<sys/ioctl.h> -#include<sys/types.h> -#include<sys/time.h> -#include<sys/param.h> -#include<i4b/i4b_tel_ioctl.h> - -// DECL DEFS -#define BUFLEN 2048 -#define MAXBLOCKS_DEFAULT 23 - -// DECL VARS -int ibytes = 0; -int obytes = 0; -int maxbytes = (BUFLEN * MAXBLOCKS_DEFAULT); - -int xfd = -1, xact = 0; -int ifd = -1, iact = 0; -int ofd = -1; -FILE *dfp = NULL; -int opt_dbg = 0; -int maxfd = 0; -fd_set set; -struct timeval timeout; -char nambuf[PATH_MAX]; -int ch; - -// DECL FUNC -void ifd_hdlr( void); -void xfd_hdlr( void); -void usage( void); -void dbg( char *fmt, ... ); - -// DEF FUNC -int main (int argc, char **argv) { - int dummy; - int x = -1; - - dfp = stderr; - while( ( ch = getopt( argc, argv, "x:i:o:b:D:")) != -1 ){ - switch(ch){ - case 'b': - x = atoi(optarg); - maxbytes = x * BUFLEN; - break; - case 'i': - ifd = open( optarg, O_RDONLY ); - iact = 1; - break; - case 'o': - ofd = open( optarg, O_WRONLY|O_TRUNC|O_CREAT ); - break; - case 'x': - xfd = open( optarg, O_RDWR ); - xact = 1; - break; - case 'D': - opt_dbg = 1; - if( (dfp = fopen( optarg, "w" )) < 0) { - dfp = stderr; - dbg("Err for opening %s\n", optarg); - exit(1); - } - break; - case '?': - default: - usage(); - break; - } - } - if( ( xfd < 0 ) || ( ifd < 0 ) || ( ofd < 0 ) ) { - dbg("Err opening one ore more Files.\n"); - dbg("xfd: %d, ifd: %d, ofd: %d\n", xfd, ifd, ofd ); - usage(); - } - - if((x = ioctl(xfd, I4B_TEL_EMPTYINPUTQUEUE, &dummy)) < 0){ - dbg("Err I4B_TEL_EMPTYINPUTQUEUE\n"); - } - - while( (iact == 1) || ( (obytes < maxbytes) && (xact == 1) ) ){ - FD_ZERO( &set); - if( iact == 1){ - FD_SET( ifd, &set); - if( ifd > maxfd) - maxfd = ifd; - dbg("FSET ifd\n"); - } - if( xact == 1){ - FD_SET( xfd, &set); - if( xfd > maxfd) - maxfd = xfd; - dbg("FSET xfd\n"); - } - x=select( maxfd+1, &set, NULL, NULL, NULL); - if( x > 0){ - if( (iact == 1) && FD_ISSET( ifd, &set) ){ - ifd_hdlr(); - } - if( (xact == 1) && FD_ISSET( xfd, &set) ){ - xfd_hdlr(); - } - } - } - dbg("exit0\n"); - return(0); -} - -void ifd_hdlr( void) { - int x; - unsigned char buf[BUFLEN]; - - x = read( ifd, buf, BUFLEN); - dbg("ifd read %d bytes\n", x); - if( x > 0 ){ - write( xfd, buf, x); - ibytes += x; - dbg("xfd %d bytes written to %d\n", x, ibytes); - } else { - iact = 0; - } -} - -void xfd_hdlr( void) { - int x; - unsigned char buf[BUFLEN]; - - x = read( xfd, buf, BUFLEN); - dbg("xfd read %d bytes\n", x); - if( x > 0){ - write( ofd, buf, x); - obytes += x; - dbg("ofd %d bytes written to %d\n", x, obytes); - } else { - xact = 0; - } -} - -void usage( void) { - fprintf(dfp, "isdntelmux V.1\n"); - fprintf(dfp, "usage: isdntelmux -x device -i ifile -o ofile [-b blocks]\n"); - exit(1); -} - -void dbg( char *fmt, ... ) { - va_list ap; - - if( opt_dbg == 0 ) - return; - va_start( ap, fmt ); - vfprintf( dfp, fmt, ap); - va_end(ap); -} diff --git a/share/examples/isdn/contrib/mrtg-isp0.sh b/share/examples/isdn/contrib/mrtg-isp0.sh deleted file mode 100644 index bdc9671..0000000 --- a/share/examples/isdn/contrib/mrtg-isp0.sh +++ /dev/null @@ -1,53 +0,0 @@ -#!/bin/sh -#--------------------------------------------------------------------------- -# -# collect callout and callback statistics for the isp0 i/f -# -# enable budget callout and callback restrictions and file -# rotation in the isdnd.rc file. -# -# last edit-date: [Fri May 25 15:22:45 2001] -# -# $FreeBSD$ -# -#--------------------------------------------------------------------------- -# -#--------------------------------------------------------------------------- -# this is the entry for mrtg in mrtg.cfg -#--------------------------------------------------------------------------- -# Target[ernie.cstat.isp0]: `/usr/local/etc/mrtg/util/mrtg-isp0.sh` -# MaxBytes[ernie.cstat.isp0]: 10 -# AbsMax[ernie.cstat.isp0]: 200 -# Title[ernie.cstat.isp0]: isp0: callouts / callbacks -# PageTop[ernie.cstat.isp0]: <H1> isp0: callouts /callbacks </H1> -# Options[ernie.cstat.isp0]: gauge, nopercent, integer -# YLegend[ernie.cstat.isp0]: co / cb -# ShortLegend[ernie.cstat.isp0]: n -# Legend1[ernie.cstat.isp0]: callouts -# Legend2[ernie.cstat.isp0]: callbacks -# LegendI[ernie.cstat.isp0]: callouts: -# LegendO[ernie.cstat.isp0]: callbacks: -# WithPeak[ernie.cstat.isp0]: ymwd -# -#--------------------------------------------------------------------------- -# this is the shell script run by mrtg -#--------------------------------------------------------------------------- -if [ -r /var/log/isdn/callouts.isp0 ] -then - cat /var/log/isdn/callouts.isp0 | awk '{print $3}' -else - echo 0 -fi - -if [ -r /var/log/isdn/callbacks.isp0 ] -then - cat /var/log/isdn/callbacks.isp0 | awk '{print $3}' -else - echo 0 -fi - -uptime | cut -c 12-18 -uname -nsr - -exit 0 - diff --git a/share/examples/isdn/i4brunppp/Makefile b/share/examples/isdn/i4brunppp/Makefile deleted file mode 100644 index e1eecea..0000000 --- a/share/examples/isdn/i4brunppp/Makefile +++ /dev/null @@ -1,19 +0,0 @@ -# $FreeBSD$ - -PROG = i4brunppp -SRCS = i4brunppp.c -MAN = i4brunppp.8 - -RUNPPPDEST= /etc/isdn - -INSTALL ?= install - -install: - @echo i4brunppp is not installed automatically. In case you want to run - @echo user-ppp in dial-in server under i4b, please copy it into /etc/isdn. - -installetc: i4brunppp - ${INSTALL} -m ${BINMODE} -o ${BINOWN} -g ${BINGRP} \ - ${.CURDIR}/i4brunppp ${RUNPPPDEST} - -.include <bsd.prog.mk> diff --git a/share/examples/isdn/i4brunppp/README b/share/examples/isdn/i4brunppp/README deleted file mode 100644 index 81ebe75..0000000 --- a/share/examples/isdn/i4brunppp/README +++ /dev/null @@ -1,18 +0,0 @@ -$FreeBSD$ - -BEWARE: HIGHLY EXPERIMENTAL! ---------------------------- - -This program is used in conjunction with an isdnd.rc entry similar to - - regexpr = "ULPPP.*call active" # look for matches in log messages - regprog = i4brunppp # execute program when match is found - -this one (see also i4brunppp-isdnd.rc). - -i4brunppp _must_ be put into /etc/isdn! - -When an active call is detected, isdnd fires off i4brunppp, which attaches -the rbch device used to stdin/stdout and then runs ppp which is given the -"-direct" command and the string "inc_rbchX" (where X is the i4brbch unit -number) as arguments. diff --git a/share/examples/isdn/i4brunppp/i4brunppp-isdnd.rc b/share/examples/isdn/i4brunppp/i4brunppp-isdnd.rc deleted file mode 100644 index 9620220..0000000 --- a/share/examples/isdn/i4brunppp/i4brunppp-isdnd.rc +++ /dev/null @@ -1,65 +0,0 @@ -#------------------------------------------------------------------------------ -# -# sample isdnd.rc for taking incoming calls with userland ppp -# ----------------------------------------------------------- -# -# $FreeBSD$ -# -# last edit-date: [Sat Jul 21 13:40:50 2001] -# -#------------------------------------------------------------------------------ -#============================================================================== -# SYSTEM section: global configuration parameters -#============================================================================== -system - -ratesfile = /etc/isdn/isdnd.rates # name & location of rates file - -useacctfile = yes # generate accouting info to file -acctall = on # generate info for everything -acctfile = /var/log/isdnd.acct # name & location of accounting file - -rtprio = 25 # modify isdnd's priority - -regexpr = "ULPPP.*call active" # look for matches in log messages -regprog = i4brunppp # execute program when match is found - -#============================================================================== -# ENTRY: Userland PPP over ISDN -#============================================================================== -entry - -name = ULPPP # name for reference - -usrdevicename = rbch # ipr, tel, rbch -usrdeviceunit = 0 # unit number - -isdncontroller = 0 # contoller to use or -1 to use any -isdnchannel = -1 # channel (1/2) to use or 0 or -1 for any - - # numbers used to verify at DIAL IN -local-phone-incoming = 567 # this is my number -remote-phone-incoming = 123 # this one can call in - - # numbers used to DIAL OUT -local-phone-dialout = 567 # this is my number -remote-phone-dialout = 123 # i call this number - -remdial-handling = first # first, last or next - -dialin-reaction = accept # accept, reject, ignore, answer - -dialout-type = normal # normal / calledback - -b1protocol = hdlc # hdlc, raw - -idletime-incoming = 30 # 3 seconds idle timeout -idletime-outgoing = 30 # 3 seconds idle timeout - -ratetype = 0 # ratesfile entry to use -unitlength = 60 # unitlength to assume - -dialretries = 2 # # of dial retries -recoverytime = 5 # time to wait between 2 dial tries - -# EOF ######################################################################### diff --git a/share/examples/isdn/i4brunppp/i4brunppp.8 b/share/examples/isdn/i4brunppp/i4brunppp.8 deleted file mode 100644 index bc47990..0000000 --- a/share/examples/isdn/i4brunppp/i4brunppp.8 +++ /dev/null @@ -1,51 +0,0 @@ -.\" -.\" Copyright (c) 1999, 2001 Hellmuth Michaelis. All rights reserved. -.\" -.\" Redistribution and use in source and binary forms, with or without -.\" modification, are permitted provided that the following conditions -.\" are met: -.\" 1. Redistributions of source code must retain the above copyright -.\" notice, this list of conditions and the following disclaimer. -.\" 2. Redistributions in binary form must reproduce the above copyright -.\" notice, this list of conditions and the following disclaimer in the -.\" documentation and/or other materials provided with the distribution. -.\" -.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -.\" SUCH DAMAGE. -.\" -.\" $FreeBSD$ -.\" -.\" last edit-date: [Sat Jul 21 13:37:00 2001] -.\" -.Dd July 28, 1999 -.Dt I4BRUNPPP 8 -.Os -.Sh NAME -.Nm i4brunppp -.Nd interface i4b to userland ppp in server mode -.Sh DESCRIPTION -The -.Nm -utility -is part of the isdn4bsd package and is used to interface i4b to the so-called -userland -.Xr ppp 8 -when dialling into an i4b machine. -.Sh FILES -.Bl -tag -width ".Pa /dev/i4brbchX" -.It Pa /dev/i4brbchX -.El -.Sh AUTHORS -The -.Nm -utility and this manpage were written by -.An Hellmuth Michaelis Aq hm@FreeBSD.org . diff --git a/share/examples/isdn/i4brunppp/i4brunppp.c b/share/examples/isdn/i4brunppp/i4brunppp.c deleted file mode 100644 index 3c8b6e7..0000000 --- a/share/examples/isdn/i4brunppp/i4brunppp.c +++ /dev/null @@ -1,224 +0,0 @@ -/* - * Copyright (c) 1999, 2001 Hellmuth Michaelis. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - *--------------------------------------------------------------------------- - * - * i4brunppp - run userland ppp for incoming call from rbch i/f - * ------------------------------------------------------------ - * - * $FreeBSD$ - * - * last edit-date: [Sat Jul 21 13:38:10 2001] - * - *--------------------------------------------------------------------------- - * - * BEWARE: HIGHLY EXPERIMENTAL! - * --------------------------- - * - * This program is used in conjunction with an isdnd.rc entry similar to - * - * regexpr = "ULPPP.*call active" # look for matches in log messages - * regprog = i4brunppp # execute program when match is found - * - * this one. It _must_ be put into /etc/isdn! - * When an active call is detected, isdnd fires off i4brunppp, which attaches - * the rbch device used to stdin/stdout and then runs ppp which is given the - * "-direct" command and the string "inc_rbchX" (where X is the i4brbch unit - * number) as arguments. - * - *---------------------------------------------------------------------------*/ - -#include <stdio.h> -#include <errno.h> -#include <unistd.h> -#include <fcntl.h> -#include <syslog.h> -#include <errno.h> -#include <string.h> -#include <time.h> -#include <ctype.h> - -#include <i4b/i4b_ioctl.h> -#include <i4b/i4b_rbch_ioctl.h> - -#define I4BDEVICE "/dev/i4b" - -#define PPPPROG "/usr/sbin/ppp" -#define PPPNAME "ppp" -#define PPPARG1 "-direct" -#define PPPLABEL "inc_" - -#define VERIFYSTRING "call active" -#define DEVSTRING "rbch" - -#define PPPDEBUG - -/*---------------------------------------------------------------------------* - * program entry - *---------------------------------------------------------------------------*/ -int -main(int argc, char **argv) -{ - char buffer[256]; - int rbch_fd; - char *p = "DeadPointer"; - int found; - int i; - -#ifdef PPPDEBUG - FILE *dfp; - time_t tim; - register struct tm *tp; -#endif - - /* open syslog */ - - (void)openlog("i4brunppp", LOG_PID|LOG_CONS|LOG_NDELAY, LOG_USER); - -#ifdef PPPDEBUG - - /* open debug log */ - - if((dfp = fopen("/tmp/i4brunppp-debug.log", "a")) == NULL) - { - syslog(LOG_INFO, "cannot open logfile: %s", strerror(errno)); - exit(1); - } - - tim = time(NULL); - tp = localtime(&tim); - strftime(buffer, 40, I4B_TIME_FORMAT, tp); - fprintf(dfp, "\n=================== %s ===================\n", buffer); - - for(i=0; i < argc; i++) - fprintf(dfp, "\t%s\n", argv[i]); -#endif - - /* check if this is the right message */ - - found = 0; - - for(i=0; i < argc; i++) - { - if((strstr(argv[i], VERIFYSTRING)) != NULL) - { - found = 1; - break; - } - } - - if(found == 0) - { -#ifdef PPPDEBUG - fprintf(dfp, "did not found [%s], exit\n", VERIFYSTRING); -#endif - exit(0); - } - - found = 0; - - /* check if we got a good device name */ - - for(; i < argc; i++) - { - if((p = strstr(argv[i], DEVSTRING)) != NULL) - { - found = 1; - break; - } - } - - if(found == 0) - { -#ifdef PPPDEBUG - fprintf(dfp, "did not found [%s], exit\n", DEVSTRING); -#endif - exit(0); - } - - /* everything ok, now prepare for running ppp */ - - /* close all file descriptors */ - - i = getdtablesize(); - - for(;i >= 0; i--) - if (i != 2) - close(i); - - /* fiddle a terminating zero after the rbch unit number */ - - p += strlen(DEVSTRING); - - if(isdigit(*p) && isdigit(*(p+1))) - *(p+2) = '\0'; - else - *(p+1) = '\0'; - - /* construct /dev/i4brbchX device name */ - - sprintf(buffer, "%s%s%s", I4BDEVICE, DEVSTRING, p); - - /* open the rbch device as fd 0 = stdin */ - - rbch_fd = open(buffer, O_RDWR); - - if(rbch_fd != 0) - { - if(rbch_fd < 0) - syslog(LOG_INFO, "cannot open %s: %s", buffer, strerror(errno)); - else - syslog(LOG_INFO, "cannot open %s as fd 0 (is %d): %s", buffer, rbch_fd, strerror(errno)); - exit(1); - } - - /* dup rbch device fd as fd 1 = stdout */ - - if((i = dup(rbch_fd)) != 1) - { - if(i < 0) - syslog(LOG_INFO, "cannot dup rbch_fd: %s", strerror(errno)); - else - syslog(LOG_INFO, "cannot dup rbch as fd 1 (is %d): %s", i, strerror(errno)); - exit(1); - } - - /* construct the label for ppp's ppp.conf file */ - - sprintf(buffer, "%s%s%s", PPPLABEL, DEVSTRING, p); - - syslog(LOG_INFO, "executing: %s %s %s %s", PPPPROG, PPPNAME, PPPARG1, buffer); - - /* execute ppp */ - - if((execl(PPPPROG, PPPNAME, PPPARG1, buffer, NULL)) == -1) - { - syslog(LOG_INFO, "cannot exec: %s", strerror(errno)); - exit(1); - } - syslog(LOG_INFO, "finished: %s %s %s %s", PPPPROG, PPPNAME, PPPARG1, buffer); - return(0); -} - -/* EOF */ diff --git a/share/examples/isdn/v21/Makefile b/share/examples/isdn/v21/Makefile deleted file mode 100644 index 261cec1..0000000 --- a/share/examples/isdn/v21/Makefile +++ /dev/null @@ -1,13 +0,0 @@ -# $FreeBSD$ - -PROG= v21modem -NO_MAN= -DPADD= ${LIBUTIL} ${LIBM} -LDADD= -lutil -lm -CFLAGS+= -g -Wall - -.if !defined(BSDTYPE) -BSDTYPE!=uname -.endif - -.include <bsd.prog.mk> diff --git a/share/examples/isdn/v21/README b/share/examples/isdn/v21/README deleted file mode 100644 index 52f553c..0000000 --- a/share/examples/isdn/v21/README +++ /dev/null @@ -1,50 +0,0 @@ - - V.21 Modem for ISDN4BSD. - -INTRODUCTION: - -The modem is implemented in software and is rather simple minded. - -It works with my Telebit TB2500 and Zyxel 2864I modems. - -There are plenty of knobs and handles which can be adjusted and I have -no real idea what to set them to for best all-round performance. - -The carrier detect timer may be a bit short tempered, and this is -probably why the dialing modem needs to be told to talk V.21 up -front. If this code were mode tolerant of loss of carrier auto -negotiation might work. - -When you get carrier ("CONNECT 300"), you must press a key before the -login banner gets printed. See the comments in "input_byte" why this -is. - -THE KERNEL PART: - -Implementes a crude "send these tones" facility, but it is enough to -take most of the real-time worries out of doing FSK modulation in -software. If suitably extended, the code could also be used to -send DTMF tones and other similar signals. - -INSTALLATION: - -The program is started from /etc/isdn/isdnd.rc: - -entry - name = I4BTEL - usrdevicename = tel - usrdeviceunit = 0 - isdncontroller = 0 - isdnchannel = -1 - local-phone-incoming = 2934812934 - remote-phone-incoming = * - dialin-reaction = answer - answerprog = v21modem - b1protocol = raw - idletime-incoming = 5 - - -Poul-Henning (phk@freebsd.org) -19991212 - -$FreeBSD$ diff --git a/share/examples/isdn/v21/v21modem.c b/share/examples/isdn/v21/v21modem.c deleted file mode 100644 index 2707cdb..0000000 --- a/share/examples/isdn/v21/v21modem.c +++ /dev/null @@ -1,394 +0,0 @@ -/* - * ---------------------------------------------------------------------------- - * "THE BEER-WARE LICENSE" (Revision 42): - * <phk@FreeBSD.org> wrote this file. As long as you retain this notice you - * can do whatever you want with this stuff. If we meet some day, and you think - * this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp - * ---------------------------------------------------------------------------- - * - * This is a V.21 modem for ISDN4BSD. - * - * $FreeBSD$ - */ - -#include <string.h> -#include <stdio.h> -#include <unistd.h> -#include <stdlib.h> -#include <fcntl.h> -#include <err.h> -#include <sys/ioccom.h> -#include <errno.h> -#include <syslog.h> -#include <sys/types.h> -#include <sys/ioctl.h> -#include <termios.h> -#include <libutil.h> - -#include <i4b/i4b_tel_ioctl.h> - -static void create_session(void); -static void input_byte(int byte, int stopbit); -static void sample(int vol, int* tones); -static void tonedetect(unsigned char *ptr, int count); -static void uart(int bit); - -static int dcd; /* Carrier on ? */ -static int ptyfd = -1; /* PTY filedescriptor */ -static int telfd = -1; /* I4BTEL filedescriptor */ - -/* - * Alaw to Linear [-32767..32767] conversion - */ - -static int a2l[256] = { -5504, -5248, -6016, -5760, -4480, -4224, --4992, -4736, -7552, -7296, -8064, -7808, -6528, -6272, -7040, --6784, -2752, -2624, -3008, -2880, -2240, -2112, -2496, -2368, --3776, -3648, -4032, -3904, -3264, -3136, -3520, -3392, -22016, --20992, -24064, -23040, -17920, -16896, -19968, -18944, -30208, --29184, -32256, -31232, -26112, -25088, -28160, -27136, -11008, --10496, -12032, -11520, -8960, -8448, -9984, -9472, -15104, -14592, --16128, -15616, -13056, -12544, -14080, -13568, -344, -328, -376, --360, -280, -264, -312, -296, -472, -456, -504, -488, -408, -392, --440, -424, -88, -72, -120, -104, -24, -8, -56, -40, -216, -200, --248, -232, -152, -136, -184, -168, -1376, -1312, -1504, -1440, --1120, -1056, -1248, -1184, -1888, -1824, -2016, -1952, -1632, --1568, -1760, -1696, -688, -656, -752, -720, -560, -528, -624, --592, -944, -912, -1008, -976, -816, -784, -880, -848, 5504, 5248, -6016, 5760, 4480, 4224, 4992, 4736, 7552, 7296, 8064, 7808, 6528, -6272, 7040, 6784, 2752, 2624, 3008, 2880, 2240, 2112, 2496, 2368, -3776, 3648, 4032, 3904, 3264, 3136, 3520, 3392, 22016, 20992, 24064, -23040, 17920, 16896, 19968, 18944, 30208, 29184, 32256, 31232, -26112, 25088, 28160, 27136, 11008, 10496, 12032, 11520, 8960, 8448, -9984, 9472, 15104, 14592, 16128, 15616, 13056, 12544, 14080, 13568, -344, 328, 376, 360, 280, 264, 312, 296, 472, 456, 504, 488, 408, -392, 440, 424, 88, 72, 120, 104, 24, 8, 56, 40, 216, 200, 248, 232, -152, 136, 184, 168, 1376, 1312, 1504, 1440, 1120, 1056, 1248, 1184, -1888, 1824, 2016, 1952, 1632, 1568, 1760, 1696, 688, 656, 752, 720, -560, 528, 624, 592, 944, 912, 1008, 976, 816, 784, 880, 848 }; - -/* - * A High Q Tone detector - */ - -#define NTONES 2 /* Number of tones to detect */ -#define SCALE 4096 /* Scaling factor */ -#define EXPAVG 14 /* Exponential Average factor */ -#define POLERAD 3885 /* pole_radius ^ 2 * SCALE */ - -/* Table of "-cos(2 * PI * frequency / sample_rate) * SCALE" */ -static int p[NTONES] = { - -2941, /* 980 Hz */ - -2460 /* 1180 Hz */ -}; - -static void -tonedetect(unsigned char *ptr, int count) -{ - int i, j; - int y; - int c, d, f, n; - static int k[NTONES], h[NTONES]; - static int tones[NTONES]; - static int amplitude; - - - for (i = 0; i < count; i++) { - y = a2l[*ptr++]; - if (y > 0) - amplitude += (y - amplitude) / EXPAVG; - else - amplitude += (-y - amplitude) / EXPAVG; - - for(j = 0; j < NTONES; j++) { - c = (POLERAD * (y - k[j])) / SCALE; - d = y + c; - f = (p[j] * (d - h[j])) / SCALE; - n = y - k[j] - c; - if (n < 0) - n = -n; - k[j] = h[j] + f; - h[j] = f + d; - tones[j] += (n - tones[j]) / EXPAVG; - } - sample(amplitude, tones); - } -} - -/* - * Taste each sample, detect (loss off) carrier, and feed uart - */ - -#define NCARRIER 1000 /* Samples of carrier for detection */ - -static void -sample(int vol, int* tones) -{ - static int carrier; - - if ((tones[0] + tones[1]) > vol * 3/2) { /* XXX */ - if (carrier < NCARRIER) - carrier ++; - } else { - if (carrier > 0) - carrier --; - } - - if (!dcd && carrier > NCARRIER / 2) { - syslog(LOG_ERR, "CARRIER ON"); - dcd = 1; - } else if (dcd && carrier < NCARRIER / 2) { - syslog(LOG_ERR, "CARRIER OFF"); - dcd = 0; - } - - if (!dcd) - return; - - if (tones[0] > tones[1]) { - uart(1); - } else { - uart(0); - } -} - -/* - * A UART in software - */ - -#define BITCENTER 13 /* Middle of a bit: 8000/300/2 */ -static int bitsample[] = { /* table of sampling points */ - BITCENTER, - BITCENTER + 27, - BITCENTER + 54, - BITCENTER + 80, - BITCENTER + 107, - BITCENTER + 134, - BITCENTER + 160, - BITCENTER + 187, - BITCENTER + 214, - BITCENTER + 240 -}; - -static void -uart(int bit) -{ - static int n, v, j; - - if (n == 0 && bit == 1) - return; /* Waiting for start bit */ - if (n == 0) { - j = 0; /* Begin start bit */ - v = 0; - n++; - } else if (j == 0 && bit && n > bitsample[j]) { - n = 0; /* Gone by middle of start bit */ - } else if (n > bitsample[j]) { - j++; /* Sample point */ - if (j == 10) { - n = 0; - input_byte(v, bit); - } else { - v = v / 2 + 128 * bit; - n++; - } - } else { - n++; - } -} - -/* - * Send a byte using kenrnel tone generation support - */ - -static void -output_byte(int val) -{ - struct i4b_tel_tones tt; - int i; - - i = 0; - tt.frequency[i] = 1850; tt.duration[i++] = 27; - - tt.frequency[i] = val & 1 ? 1650 : 1850; tt.duration[i++] = 27; - tt.frequency[i] = val & 2 ? 1650 : 1850; tt.duration[i++] = 26; - tt.frequency[i] = val & 4 ? 1650 : 1850; tt.duration[i++] = 27; - tt.frequency[i] = val & 8 ? 1650 : 1850; tt.duration[i++] = 27; - tt.frequency[i] = val & 16 ? 1650 : 1850; tt.duration[i++] = 26; - tt.frequency[i] = val & 32 ? 1650 : 1850; tt.duration[i++] = 27; - tt.frequency[i] = val & 64 ? 1650 : 1850; tt.duration[i++] = 27; - tt.frequency[i] = val & 128 ? 1650 : 1850; tt.duration[i++] = 26; - - tt.frequency[i] = 1650; tt.duration[i++] = 27; - tt.frequency[i] = 1650; tt.duration[i++] = 0; - - i = ioctl(telfd, I4B_TEL_TONES, &tt); - if (i != 0 && errno != EAGAIN) { - syslog(LOG_ERR, "%d: *** %d/%d ***", __LINE__, i, errno); - exit(0); - } -} - -/* - * Create Session - */ - -static void -create_session(void) -{ - int i; - char buf[100]; - - i = forkpty(&ptyfd, buf, 0, 0); - if (i == 0) { - execl("/usr/libexec/getty", "getty", "std.300", "-", - (char *)NULL); - syslog(LOG_ERR, "exec getty %d", errno); - exit(2); - } else if (i < 0) { - syslog(LOG_ERR, "forkpty failed %d", errno); - exit(2); - } - syslog(LOG_ERR, "pty %s", buf); -} - -static void -input_byte(int byte, int stopbit) -{ - u_char c; - int i; - static int first; - static u_char buf[80]; - - if (!stopbit) - return; - c = byte; - /* - * I have no idea why, but my TB2500 modem sends a sequence of - * 28 bytes after carrier is established at the link level, but - * before it is acceptted at the logical level. - * - * [16100214010201060100000000ff0201020301080402400010034510] - * - * Unfortunately this contains a ^D which kills getty. - * The following code swallows this sequence, assuming that it - * is always the same length and always start with 0x16. - * - */ - if (first == 0 && c == 0x16) { - sprintf(buf, "%02x", c); - first = 27; - return; - } else if (first == 0) { - first = -1; - dcd = 2; - return; - } - if (first > 0) { - sprintf(buf + strlen(buf), "%02x", c); - first--; - if (!first) { - syslog(LOG_NOTICE, "Got magic [%s]", buf); - *buf = 0; - } - return; - } - if (ptyfd != -1 && dcd) { - i = write(ptyfd, &c, 1); - if (i != 1 && errno != EAGAIN) { - syslog(LOG_ERR, "%d: *** %d/%d ***", __LINE__, i, errno); - exit(0); - } - } -} - -int -main(int argc, char **argv) -{ - char *device = "/dev/tel0"; - u_char ibuf[2048]; - int ii, io; - int i, maxfd; - struct i4b_tel_tones tt; - fd_set rfd, wfd, efd; - - openlog("v21modem", LOG_PID, LOG_DAEMON); - /* Find our device name */ - for (i = 0; i < argc; i++) - if (!strcmp(argv[i], "-D")) - device = argv[i + 1]; - telfd = open(device, O_RDWR, 0); - if (telfd < 0) { - syslog(LOG_ERR, "open %s: %m", device); - exit (0); - } - syslog(LOG_NOTICE, "Running on %s", device); - - /* Output V.25 tone and carrier */ - i = 0; - tt.frequency[i] = 0; tt.duration[i++] = 1000; - tt.frequency[i] = 2100; tt.duration[i++] = 2*8000; - tt.frequency[i] = 0; tt.duration[i++] = 400; - tt.frequency[i] = 1650; tt.duration[i++] = 1; - tt.frequency[i] = 1650; tt.duration[i++] = 0; - tt.frequency[i] = 0; tt.duration[i++] = 0; - i = ioctl(telfd, I4B_TEL_TONES, &tt); - if (i < 0) { - syslog(LOG_ERR, "hangup"); - exit(0); - } - - create_session(); - - /* Wait for carrier */ - do { - ii = read(telfd, ibuf, sizeof ibuf); - tonedetect(ibuf, ii); - } while (ii > 0 && dcd != 2); - if (ii < 0) { - syslog(LOG_ERR, "hangup"); - exit(0); - } - - maxfd = ptyfd; - if (telfd > maxfd) - maxfd = telfd; - maxfd += 1; - do { - FD_ZERO(&rfd); - FD_SET(telfd, &rfd); - FD_SET(ptyfd, &rfd); - FD_ZERO(&wfd); - FD_ZERO(&efd); - FD_SET(telfd, &efd); - FD_SET(ptyfd, &efd); - i = select(maxfd, &rfd, &wfd, &efd, NULL); - if (FD_ISSET(telfd, &rfd)) { - ii = read(telfd, ibuf, sizeof ibuf); - if (ii > 0) - tonedetect(ibuf, ii); - else - syslog(LOG_ERR, "hangup"); - } - if (FD_ISSET(ptyfd, &rfd)) { - io = read(ptyfd, ibuf, 1); - if (io == 1) - output_byte(*ibuf); - else if (io == 0) { - syslog(LOG_ERR, "Session EOF"); - exit(0); - } - - } - if (FD_ISSET(telfd, &efd)) { - syslog(LOG_ERR, "Exception TELFD"); - exit (0); - } - if (FD_ISSET(ptyfd, &efd)) { - syslog(LOG_ERR, "Exception PTYFD"); - exit (0); - } - } while (dcd); - syslog(LOG_ERR, "Carrier Lost"); - exit(0); -} diff --git a/share/examples/ppp/isdnd.rc b/share/examples/ppp/isdnd.rc deleted file mode 100644 index 0ceef6d..0000000 --- a/share/examples/ppp/isdnd.rc +++ /dev/null @@ -1,69 +0,0 @@ -# example of a configuration file for the isdn daemon & user-ppp -# -# $FreeBSD$ - - -# SYSTEM section: isdnd global configuration parameters - -system - -# accounting - -acctall = on # generate info for everything -acctfile = /var/log/isdnd.acct # name & location of accounting file -useacctfile = yes # generate accouting info to file -isdntime = on -monitor-allowed = no # global switch: monitor on/off - - -# User-ppp example - -entry -name = userppp0 -usrdevicename = rbch -usrdeviceunit = 0 -isdncontroller = 0 -isdnchannel = -1 -local-phone-incoming = 1234567 -remote-phone-incoming = * -local-phone-dialout = 1234567 # This *MUST* be your local number -remote-phone-dialout = 1234567 # ppp(8) will override this -remdial-handling = first -dialin-reaction = ignore -dialout-type = normal -b1protocol = hdlc -idletime-incoming = 900 # Should be larger than ppp's timeout -idletime-outgoing = 900 # Should be larger than ppp's timeout -unitlength = 0 -unitlengthsrc = conf -dialretries = 1 -dialrandincr = on -recoverytime = 1 # Should be smaller than ppp's redial -usedown = off -downtries = 2 -downtime = 30 - -entry -name = userppp1 -usrdevicename = rbch -usrdeviceunit = 1 -isdncontroller = 0 -isdnchannel = -1 -local-phone-incoming = 1234567 -remote-phone-incoming = * -local-phone-dialout = 1234567 # This *MUST* be your local number -remote-phone-dialout = 1234567 # ppp(8) will override this -remdial-handling = first -dialin-reaction = accept -dialout-type = normal -b1protocol = hdlc -idletime-incoming = 900 # Should be larger than ppp's timeout -idletime-outgoing = 900 # Should be larger than ppp's timeout -unitlength = 0 -unitlengthsrc = conf -dialretries = 1 -dialrandincr = on -recoverytime = 1 # Should be smaller than ppp's redial -usedown = off -downtries = 2 -downtime = 30 diff --git a/share/examples/ppp/ppp.conf.isdn b/share/examples/ppp/ppp.conf.isdn deleted file mode 100644 index 8946b4b..0000000 --- a/share/examples/ppp/ppp.conf.isdn +++ /dev/null @@ -1,98 +0,0 @@ -# -# Copyright (c) 1997 Brian Somers <brian@Awfulhak.org> -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions -# are met: -# 1. Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# 2. Redistributions in binary form must reproduce the above copyright -# notice, this list of conditions and the following disclaimer in the -# documentation and/or other materials provided with the distribution. -# -# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE -# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS -# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) -# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT -# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY -# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -# SUCH DAMAGE. -# -# $FreeBSD$ - -# This is an example ppp profile for bringing up a multilink ppp connection -# over ISDN. It needs at least version 0.83.0 of the i4b code. An example -# isdnd configuration file is also supplied in this directory (isdnd.rc) -# -# NOTE: This is for use with i4b-supported ISDN cards. If you have an -# external Terminal Adapter (TA) plugged into a serial port on your -# machine, you should use the TA example in ppp.conf.sample. -# -isdn: - set phone 12345678 # Replace this with your ISPs phone number - - set authname "somename" # Replace these with your login name & password. - set authkey "somepasswd" # This profile assumes you're using PAP or CHAP. - - set enddisc mac # Assuming you have a LAN - - enable lqr echo - set reconnect 3 5 - set redial 3 10 - set lqrperiod 45 - disable pred1 deflate mppe - deny pred1 deflate mppe - - set timeout 60 300 # The minimum charge period is 5 minutes, so don't - # hangup before then - - # We have no chat scripts in the ISDN world (yet) - set dial - set login - set logout - set hangup - - set device /dev/i4brbch0 /dev/i4brbch1 # Raw B-channel devices - set speed sync # ISDN is synchronous - - enable dns # Ask the peer what to put in resolv.conf - - # Take a wild guess at an IP number and let the other side decide - set ifaddr 172.16.0.1/0 212.0.0.0/0 0 0 - add! default hisaddr - - set mrru 1500 # Multilink mode please - set mru 1504 # Room for the MP header - - clone 1,2 # Two new links - link deflink rm # And get rid of the original one - - link * set mode auto # Automatically manage the second link - set autoload 10 80 30 # Down @10% usage, up at 80%, 30s sample - - set server /var/run/ppp/ppp-isdn "" 0177 # The diagnostic port (-rw-------) - -# -# When phone calls become free (say 0:00 Saturday morning), we may want -# this in crontab (``crontab -l'', not /etc/crontab): -# -# 1 0 0 0 6 /usr/sbin/pppctl /var/run/ppp/ppp-isdn link \* set mode ddial -# -# and when we have to pay again (say 23:59 Sunday night), we may want -# this: -# -# 54 23 0 0 0 /usr/sbin/pppctl /var/run/ppp/ppp-isdn link \* set mode auto -# -# And of course just in case of a weekend reboot, add -# /usr/local/etc/rc.d/ppp.sh: -# -# #! /bin/sh -# [ ."$1" != .start ] && exit 0 -# case `date +%w` in -# 6|0) /usr/sbin/pppctl /var/run/ppp/ppp-isdn link \* set mode ddial;; -# esac diff --git a/share/examples/ppp/ppp.conf.sample b/share/examples/ppp/ppp.conf.sample index f59d18d..7863eaa 100644 --- a/share/examples/ppp/ppp.conf.sample +++ b/share/examples/ppp/ppp.conf.sample @@ -672,8 +672,6 @@ callback-server-client-decides: # It's worth increasing your MTU and MRU slightly in multi-link mode to # prevent full packets from being fragmented. # -# See ppp.conf.isdn for an example of how to do multi-link isdn. -# # You can now ``dial'' specific links, or even dial all links at the # same time. The `dial' command may also be prefixed with a specific # link that should do the dialing. |