Linux-Networking Digest #869, Volume #10 Thu, 15 Apr 99 14:13:40 EDT
Contents:
Re: I NEED 4 THINGS!!! PLEASE!! ("Mark F. Burgo ( Systems Administrator )")
test (Thomas =?iso-8859-1?Q?Sch=E4ffer?=)
Re: ip port forwarding with ipchains (Javier Prieto)
telnetd says 'all network ports in use' ([EMAIL PROTECTED])
IPCHAINS RULESET?? ([EMAIL PROTECTED])
Re: Linux and NetBIOS??? ("Daniel G. Hyams")
FTP server & chroot ("j")
Re: need help with modem setup in Redhat 5.2 (Jarkko K Karhunen)
Re: telnet for root (please help) (Kuo Sung *Eric* Swei)
Problem in configuring the 3C509 NIC on redhat5.2 (Bryan)
FREE Computer Documentation ([EMAIL PROTECTED])
Re: Cant find driver for Compex EN2000 ethernet adapter (Jan Oosting)
Re: NT faster than Linux? (David Damerell)
Re: Home Network Help (RE) ("Daniel G. Hyams")
Re: really slow 100Mb ethernet ("Daniel G. Hyams")
Re: question about vmware (mist)
Re: Samba & Linux RH52 --- NT & Access ("alvin")
FS Battery ("j.kyong")
Re: Machine name themes - what do you use? (Jim Brayton)
Re: NT faster than Linux? (MJ Ray)
testing outgoing (Marv Nachatelo)
Socket programming under redhat 5.2 (David Brock)
----------------------------------------------------------------------------
From: "Mark F. Burgo ( Systems Administrator )" <[EMAIL PROTECTED]>
Subject: Re: I NEED 4 THINGS!!! PLEASE!!
Date: Thu, 15 Apr 1999 08:56:59 -0400
Reply-To: [EMAIL PROTECTED]
Slow down!
John Thrasher wrote:
>
> 1.) To get a GUI interface (preferably an RPM) that works in KDE on
> RedHat 5.2 that will enable me to use my CD-R (Mitsumi 2801TE). I
> already have it set up for SCSI correctly. X-cdroast is a piece of shit.
I have been using Xcdroast for over a year what is wrong with it. It
has never failed for me! Be more specific ad I will give you a hand.
>
> 2.) Same as above but for a generic scanner, and please don't tell me to
> go to mostang.com I have and installed SANE their documentation sux and
> I need a step by step method for someone new to Linux (that seems very
> hard to come by!).
Sane is a very good piece of software, what problems are you having!
>
> 3.) I set up my printer in the Red Hat installation without a hitch, it
> seemed. I try to print, no dice!
What printer and how have you set it up
>
> 4.) A good, free Office Suite for KDE in RPM format.
StarOffice is free for personal use big to download but free and works!
>
> I know it sounds like a lot but until I am able to get these things
> resolved I will be unable to delete Microsoft Win95. I really want Linux
> to win but if things like this aren't addressed with a little more ease
> IT NEVER WILL!! I am fed up with messing with zipped files and compiling
> shit!
>
> Am I screwed???
>
> Please respond to [EMAIL PROTECTED]
>
> Thank you,
> John
John,
Most of the things you have said are worthless, YOU NEED TO EXPLAIN THE
PROBLEMS, or else no one can help you. Don't take this the wrong way we
where all new to this at one time but to get help you need to state what
the problems are.
I personally don't like KDE I run Enlightenment or Motif but to each
his own. And as far as everything being RPM's learn how to use tar,
RPM's are usually a few versions behind.
Write me if you would like some help but don't just say things are
junk, garbage, crap. Some people have spent there good time to create
these tools for your use and just because your new and unsure in the
configuration and setup of these applications they are not one of the
above. The applications you have picked out above are fine pieces of
work that some of us have never had a problem with. We will help you
but you have to give us quality information to begin and assist. As far
as documentation for beginners, there is nothing that is going to make
it easier, not even step by step because this is not how it is done.
Write and I will help....
Mark
--
==================================
Burgo Systems / Consulting
E-Mail: [EMAIL PROTECTED]
http://www.surfshop.net/~mfburgo
This message was sent by Mark F. Burgo
On RedHat Linux 5.2
Burgo Systems / Consulting is happy to preload Linux on your new
BS/C System, Factory Direct
==================================
------------------------------
Date: Wed, 14 Apr 1999 13:41:41 +0200
From: Thomas =?iso-8859-1?Q?Sch=E4ffer?=
Reply-To: [EMAIL PROTECTED]
Subject: test
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
test</html>
------------------------------
From: Javier Prieto <[EMAIL PROTECTED]>
Subject: Re: ip port forwarding with ipchains
Date: Thu, 15 Apr 1999 11:27:35 GMT
In article <IG9R2.21671$[EMAIL PROTECTED]>,
[EMAIL PROTECTED] (J.J. Scott) wrote:
> /sbin/ipchains -A input - j DENY -p all -l -s 127.0.0.0/8 -i eth1 -d 0.0.0.0/0
Humm... I've studied this line and still don't know what is it for. It denies
all the access from the local host to the internet using interface eth1,
doesn't it?
> /sbin/ipchains -A forward -j MASQ -s 204.72.141.0/24 -d 0.0.0.0/0
> /sbin/ipchains -A forward -j MASQ -s 0.0.0.0/0 -d 204.72.141.0/24
Why do you consider both was? I use only the first line and it looks to work
perfectly :-?
> /usr/sbin/ipmasqadm portfw -a -P tcp -L XXX.XXX.XXX.XXX 21 -R 204.72.141.4 21
That's exactly the line I'm using, and it still doesn't work.
As I seem to use the correct commandline, I'm now looking for a way to debug
what port-forwarding is doing, so I can learn what's wrong. Any help?
Javier Prieto
Optima Technologies, Sevilla (Spain)
[EMAIL PROTECTED]
============= Posted via Deja News, The Discussion Network ============
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
From: [EMAIL PROTECTED]
Subject: telnetd says 'all network ports in use'
Date: Thu, 15 Apr 1999 15:12:00 GMT
Hi there!
I'm running Linux 2.2.5 and it's doing pretty well, except for telnetd. If I
try to connect via telnet to the Linux machine either from a local shell or
from the LAN, I always get the msg "telnetd : all network ports in use"
though there's just one user connected. Disabling ftpd, apache-httpd or samba
doesn't help either!
Where can I fix this?
Thanks a lot for any helping stuff!!
CU!
Madmax
============= Posted via Deja News, The Discussion Network ============
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
From: [EMAIL PROTECTED]
Subject: IPCHAINS RULESET??
Date: Thu, 15 Apr 1999 15:12:48 GMT
Does anyone have a strong ruleset they would be willing to post for me to use
as an example? I have tried writing my own for two boxes running on a cable
modem but when I load it I dont get any internet traffic thru...not even on
the firewall box. I guess I just dont understand enough of the rules and how
they work. I plan to use the first box strictly as a firewall box and the
second is a dual boot between windoze and Linux (mandrake 5.3). I use ICQ,
Instant messenger, mIRC, and multiplayer games. Any and all help would be
greatly appreciated!!!
Thanks
Reggie
============= Posted via Deja News, The Discussion Network ============
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
From: "Daniel G. Hyams" <[EMAIL PROTECTED]>
Subject: Re: Linux and NetBIOS???
Date: Thu, 15 Apr 1999 11:21:12 -0500
On Wed, 14 Apr 1999, Jan Sevelsted wrote:
> Hi.
> I'm pretty new to Linux and am trying to set up a (actually changing a
> server from DOS (Lantastic) to a) Linux-server.
> However (ahh, here comes the catch :-) ) I would like to keep
> my other machines as they were for various reasons. As I already have a
> working network, supporting my daughter's PC running DOS and Win3.11, my
> own main-machine under OS/2 and my packet machine (DOS) monitoring and
> controlling my remote packet-BBS.
> Anyone who knows were to find the magic knowledge?
> Thanks in advance.
> Jan Sevelsted
> [EMAIL PROTECTED]
The samba package (nmbd, more specfically), supports NetBIOS name
resolution. Look in /usr/doc/samba*.
===========================================================
Daniel G. Hyams
email: [EMAIL PROTECTED]
phone: (601) 323-4198
===========================================================
------------------------------
From: "j" <[EMAIL PROTECTED]>
Subject: FTP server & chroot
Date: Thu, 15 Apr 1999 15:36:47 GMT
how could I configure ftp server with chroot, so that user only has access
to his home directory and nothing else?
Thanks for help
------------------------------
From: [EMAIL PROTECTED] (Jarkko K Karhunen)
Crossposted-To: alt.os.linux.dial-up,alt.os.linux,comp.os.linux.hardware
Subject: Re: need help with modem setup in Redhat 5.2
Date: Thu, 15 Apr 1999 16:22:41 GMT
On Thu, 15 Apr 1999 00:58:03 -0700, "Bill Spargur"
<[EMAIL PROTECTED]> wrote:
>hello..
>
>i am relatively new to the Linux environment and am having trouble
>setting up my modem configuration. In Win 98, the modem is set
>for COM4, IRQ 11 (it is a Creative Labs Modem Blaster 56k v.90 KFlex).
>However, when my Linux OS boots up (Redhat 5.2), it
>doesn't detect the modem and I can't seem to configure anything
>to match it, even using symbolic links. Can anyone please help?
>
>
>
>
Check your IRQ's. My modem was com2 irq 7. It worked fine in my 95 but
went autistic in DOS and Linux. Moved it to irq 3 (had disabled the
original com2 at the very beginning) and it worked fine. (wvdial is
massive cool)
JK
------------------------------
From: Kuo Sung *Eric* Swei <[EMAIL PROTECTED]>
Subject: Re: telnet for root (please help)
Date: Thu, 15 Apr 1999 11:09:31 -0500
Go edit your /etc/rc.config file. There should be a line
ROOT_LOGIN_REMOTE="no"
change it to yes. You might have to reboot after this?
Eric
EYRAUD wrote:
> Telnet from a PC under Windows to Linux works correctly, excepted for
> root.
> It is a home LAN (2 PC !) without security problem.
>
> Where is the key ?
>
> Thanks
> Laurent
--
Kuo Sung "Eric" Swei
Andersen Consulting
Tel: (972) 927-6167
Fax: (972) 927-6144
Email: [EMAIL PROTECTED]
------------------------------
From: Bryan <[EMAIL PROTECTED]>
Subject: Problem in configuring the 3C509 NIC on redhat5.2
Date: Thu, 15 Apr 1999 21:38:01 +0800
I have installed the Redhat5.2 on my computer, though I have the
3C509 NIC installed on the computer. The system cannot recognise the
NIC. What's problem with my NIC?
I am now using this NIC with my Win95 properly.
My NIC have the AUI/UTP/BNC output. Does the linux auto-sense the
output port?
Can you tell me the procedure/command to active the lan card on the
linux?
Thank you very very much
--
To make each day count!
Best Wishes,
Bryan Wu,
------------------------------
From: [EMAIL PROTECTED]
Crossposted-To: comp.os.linux,comp.os.linux.hardware,comp.os.linux.misc
Subject: FREE Computer Documentation
Date: Thu, 15 Apr 1999 15:39:18 GMT
FREE Computer Documentation
books, standards, specifications, source code, and more
200+ megabyte archive online!
- graphics (quicktime, gif, jpeg, pcx, png, targa, tiff ...)
- emedia (cd-rom, dvd ...)
- internet (cgi, freebsd, html, http, javascript, rfc, tcp-ip)
- publishing (pcl, pcl4, pcl5, pdf, truetype, postscript ...)
<a href="http://doc.thesa.ru">http://doc.thesa.ru</a>
Welcome there.
--
============= Posted via Deja News, The Discussion Network ============
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
------------------------------
From: [EMAIL PROTECTED] (Jan Oosting)
Subject: Re: Cant find driver for Compex EN2000 ethernet adapter
Date: Thu, 15 Apr 1999 13:39:23 GMT
Reply-To: [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:
>I am attempting to put a redhat linux 52 machine onto the network and i am
>using a Compex EN2000 ISA ethernet card. I am having trouble finding a driver
>that works for this card. I also have a DEC DE204 eth card (ISA also), which
>may be broken btw, and there is no driver for it either, although i havent
>tried it yet. Any thoughts? Maybe someone can tell me some good IO ports and
>IRQs to try with the generic driver on either of these cards? Any help that
>can be offered is much appreciated. Also i am relatively new to linux
>networking, so semi-explicit instructions are very helpful.
Make yourself a bootable dos/win9x diskette and put the compex
utilities on it (if you lost the original disk you can get them from
http://www.compex-inc.com/index.htm , it's in the obsolete isa card
drivers)
Reboot with this diskette
Set your irq and i/o address and put it in EN2000 mode.
Now you can use the standard EN2000 linux drivers with the parameters
you selected
Greetz,
Jan
------------------------------
From: [EMAIL PROTECTED] (David Damerell)
Crossposted-To: linux.samba,uk.comp.os.linux
Subject: Re: NT faster than Linux?
Date: 15 Apr 1999 14:47:26 +0100 (BST)
Reply-To: [EMAIL PROTECTED]
David Damerell <[EMAIL PROTECTED]> wrote:
>Laurie Brown <[EMAIL PROTECTED]> wrote:
>>I received this pointer today. Comments anyone?
>>http://www.mindcraft.com/whitepapers/nts4rhlinux.html
>Look at the 'Mindcraft Certification' section. Sponsored by Microsoft.
>[They stitch up a Sun E450 in a similar fashion.]
>My guess is that the results were obtained by being extremely adept in
>setting up WinNT (presumably with advice from the sponsors on how
>precisely to optimise for this benchmark) and not at all adept at
>setting up Red Hat. Screwy kernel configuration, perhaps?
Further to this, Linux Weekly News (www.lwn.net) contains links to two
fairly detailed explanations of exactly how the Linux machine was
misconfigured; frex, although 2.2.3 was out, 2.2.2 with known difficulties
talking TCP/IP to Windoze was used; Samba and Apache were compiled without
maximal optimisation; and so forth. There is also a link to a protest by
Novell when MindCraft 'benchmarked' them against NT, also sponsored by
MicroSoft. I think the only conclusion we can draw is that MindCraft's
results have more to do with the origin of the money than anything else.
No doubt this will hit the trade press some time next week. People should
write in, but calmly; a page of rabid froth will do us no favours (if your
spelling and grammar isn't near-perfect, don't even bother). The thing to
do is to read the rebuttals LWN points to, summarise what you believe are
the more important points, mention the sponsor of the MindCraft results,
mention the Novell thing, and provide the URLs of the rebuttals
themselves.
--
David/Kirsty Damerell. [EMAIL PROTECTED]
CUWoCS President. http://www.chiark.greenend.org.uk/~damerell/ Hail Eris!
|___| [EMAIL PROTECTED] is not my email address,|___|
| | | and email sent to it will be assumed to be spam and blocked. | | |
------------------------------
From: "Daniel G. Hyams" <[EMAIL PROTECTED]>
Subject: Re: Home Network Help (RE)
Date: Thu, 15 Apr 1999 11:06:06 -0500
On Thu, 15 Apr 1999, Michael Picco wrote:
> This comes close to the problem I'm having, but the differences are
> minor. Currently I have two systems running RedHat 5.2 with a network
> card in each machine. I can ping the local host on each machine, but
> the machines can't ping each other. Checking each system with
> ifconfig -a
> indicates that all seems to be working well.
>
> 1) Does one machine need to be set up as a server?
No.
> Presently I can
> get two machines talking nicely via the network (ethernet cards
> connected to a 5-port hub) when running Windoze 95. So the hardware
> seems to be just fine.
But make sure that you have the hardware set up correctly in linux; if
ifconfig -a works well, then I think this one is OK. Can you mail
or post the output of ifconfig -a? It should show the IP address assigned
to the ethernet card as well as the netmask.
> 2) I'm not connecting this network to the outside world at all. At
> best it will be working with 3 machines when all is said and done.
> The IP addresses I've given are made up ( 111.111.111.110 &
> 111.111.111.112) with netmasks for each of 255.255.255.0.
I am an inexperienced networker, but it might be prudent to choose more
appropriate IP numbers. 192.168.x.x is set aside for isolated networks;
I would suggesting using 192.168.100.1, 192.168.100.2, and 192.168.100.3
with a netmask of 255.255.255.0.
Perhaps you don't have a route added for your ethernet card. Try
the following (based on my IP numbering scheme above) (syntax may
or may not be correct):
route add 192.168.100.0 netmask 255.255.255.0 dev eth0
Add this route on each computer.
And then try a 'ping 192.168.100.1' and so on from each computer; they
should be able to answer. If everything is OK thus far, then edit
your /etc/hosts file (I assume that, for such a small network, you
don't want to mess with DNS) and add the entries:
192.168.100.1 bart
192.168.100.2 lisa
192.168.100.3 homer
And again try your pings, but with the machine names instead
of IP addresses.
===========================================================
Daniel G. Hyams
email: [EMAIL PROTECTED]
phone: (601) 323-4198
===========================================================
------------------------------
From: "Daniel G. Hyams" <[EMAIL PROTECTED]>
Subject: Re: really slow 100Mb ethernet
Date: Thu, 15 Apr 1999 11:12:58 -0500
On Wed, 14 Apr 1999, Stephen Carville wrote:
> >
> > * Double checked/changed all hubs and cables to and from the patient. *
> > Made sure neither routed nor gated are running * Forced full duplex / 100 Mb
> > on the NIC (just in case) * Ping-ed across the network 'till I was blue in
> > the face; no packet loss (even with sizes up to 512 bytes), no duplicates,
> > ever! * Checked for shared/overlapping irq/io * Checked ad nauseum
> > broadcast addresses, routing tables, etc. etc. you just nslookup it, I've
> > done it :p
>
> NEVER run full duplex except on a _switched_ network! NEVER! Full duplex
> does not stop and listen before transmitting and is guaranteed to give you
> collisions and FCS errors up the wazoo except on the most lightly loaded
> network.
How would one change the ethernet card from full duplex to half duplex?
I probably have the same problem as the original poster, since I didn't
set anything explicitly.
===========================================================
Daniel G. Hyams
email: [EMAIL PROTECTED]
phone: (601) 323-4198
===========================================================
------------------------------
From: mist <[EMAIL PROTECTED]>
Subject: Re: question about vmware
Date: Thu, 15 Apr 1999 10:36:44 +0100
Reply-To: mist <new$[EMAIL PROTECTED]>
Christian D Freet <[EMAIL PROTECTED]> scribed to us that -
>Can I use the vmware virtual machine (in windows 98 mode) and
>networking? with
>dial up
>connection.....
If you mean "Can I run a Windows 98 virtual machine on a Linux box and
access the net in the virtual machine?" then the answer is yes. [1]
[1] At least, it works for '95.
--
Mist.
------------------------------
From: "alvin" <[EMAIL PROTECTED]>
Crossposted-To: linux.samba,comp.os.linux.setup,comp.protocols.smb
Subject: Re: Samba & Linux RH52 --- NT & Access
Date: Thu, 15 Apr 1999 08:19:32 +0800
Please also send answers here for all to share.
Andrei Safonov wrote in message <3714bb2c$0$[EMAIL PROTECTED]>...
>When MS Access 7.0 opens large (20Mb) database from network drive on Samba
>Linux happens in MS Access error : "Disk or network error". At this time
>SMBSTATUS inform no open files from client side.
>Small databases are seems to be working.
>
>Tested database is our company working database and we are using it from MS
>NT server without any problems.
>
>Please send me answers to [EMAIL PROTECTED]
>
>Regards,
>Andrei Safonov
>
>
------------------------------
From: "j.kyong" <[EMAIL PROTECTED]>
Crossposted-To:
comp.os.ms-windows.networking.win95,pl.comp.networking,microsoft.public.win98.networking,microsoft.public.win95.networking
Subject: FS Battery
Date: Thu, 15 Apr 1999 09:52:46 -0700
Reply-To: [EMAIL PROTECTED]
Hi all
I have a for sale Battery.
Manufacture : Johnson Controls Made in U.S.A.
TEL:12.90 Vale Regulated.
12Volts, 90Amp Hours ( 8 Hour rate to 1.75 VPC )
Terminal Hardware Torque : 110 in - ibs.
(log Duration Series)
If you interest.
Please give me a call at 714-778-5151 or e-mail
with your offer.
------------------------------
From: Jim Brayton <[EMAIL PROTECTED]>
Crossposted-To:
vmsnet.networks.misc,microsoft.public.windowsnt.domain,comp.unix.solaris,comp.os.os2.networking.server,comp.os.ms-windows.nt.admin.networking,comp.infosystems.www.servers.unix
Subject: Re: Machine name themes - what do you use?
Date: Thu, 15 Apr 1999 10:55:21 -0600
What, no Simpsons?!
Homer
Marge
Bart
Lisa
Maggie
Moe
Apu
Barney
MrBurns
MrSmithers
Snake
ChiefWiggam
etc
Nobody Here wrote:
> Wesley W. Garland wrote:
>
> > >> What about characters from 'The Lord of the Rings' ..?
> > >>
> > >> gandalf ... frodo ... sauron ... legolas ...
> > >>
> > >> Guess who's gonna be changing his /etc/hosts this afternoon ... :-)
> > >>
> > >> --
> > >> Desmond Coughlan |Restez zen ... Linux peut le faire
> > >> [EMAIL PROTECTED]
> > >> [www site under construction]
> > >
> > >Certainly better than from "Lord of the Flies"... <grin>
> >
>
> WAY better than from :
> "Lord of the Dance".... Flatley...Gillian....Areleen...Patrick....Shawn..<
> big grin>
>
> Doug
--
Jim Brayton
Email: [EMAIL PROTECTED]
------------------------------
From: [EMAIL PROTECTED] (MJ Ray)
Crossposted-To: linux.samba,uk.comp.os.linux
Subject: Re: NT faster than Linux?
Date: 15 Apr 1999 14:53:34 GMT
David Damerell wrote:
>My guess is that the results were obtained by being extremely adept in
>setting up WinNT (presumably with advice from the sponsors on how
>precisely to optimise for this benchmark) and not at all adept at
>setting up Red Hat. Screwy kernel configuration, perhaps?
I don't know, but their Apache configuration looks like it will
impose a fairly low limit on number of clients in their test.
>[...] I think the conclusion to be drawn is that Microsoft sponsorship
>slows Linux systems down.
Spoken like a true statistician!
--
MJR
Please use the address in the Reply-To line at the top, if set.
http://stats.mth.uea.ac.uk/ http://www.stu.uea.ac.uk/
------------------------------
From: Marv Nachatelo <[EMAIL PROTECTED]>
Subject: testing outgoing
Date: Thu, 15 Apr 1999 10:49:34 -0400
==============582E74C46502B19AA90CAA48
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Issueing a test.
Linux rocks!
Marv
==============582E74C46502B19AA90CAA48
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<pre>Issueing a test.</pre>
<pre></pre>
<pre>Linux rocks!</pre>
<pre></pre>
<pre>Marv</pre>
</html>
==============582E74C46502B19AA90CAA48==
------------------------------
From: David Brock <[EMAIL PROTECTED]>
Subject: Socket programming under redhat 5.2
Date: Thu, 15 Apr 1999 10:49:40 -0700
I am attempting to write a very simple socket server under Linux (Redhat
5.2). The program listed below compiles and runs fine, but I am unable
to connect up to the specified port (As a quick and dirty test I'm using
telnet <hostname> <port>). Each time I get a Connection refused message.
I've tried this program under two different installations of Linux (5.2
and a 5.1) and I see the same behavior. If, however, I compile and run
this same program under Solaris 2.5.1 it works fine.
As a data point I know that sockets work on my box because I can write
Java sockets all day long (that work), and I can use the middleware
product ACE and open and close sockets like crazy. Are there any special
compiler/linker flags that I'm missing (I've even got apache running and
accepting socket connections). Any help would be much appreciated!
-David-
Example Code (not the cleanest or best way to do sockets perhaps, but
this is just a down and dirty c program for testing):
#include <sys/types.h>
#include <sys/socket.h>
#include <netdb.h>
#include <netinet/in.h>
#include <sys/time.h>
#include <unistd.h>
#include <errno.h>
int
main() {
struct sockaddr_in myaddr;
int endptID;
int selectRtn = -1;
int len = sizeof(struct sockaddr_in);
char host[512];
struct hostent *localHost;
fd_set readfds;
struct timeval timeOut;
myaddr.sin_family = AF_INET;
myaddr.sin_port = 5000;
myaddr.sin_addr.s_addr = INADDR_ANY;
if ( (endptID = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP)) == -1 ) {
printf("ERROR: Socket failed\n");
endptID = -1;
} else {
if ( gethostname(host,512) == -1 ) {
printf("ERROR: Host unknown\n");
endptID = -1;
} else {
if ( (localHost = gethostbyname(host)) == NULL ) {
printf("ERROR: gethostbyname failed\n");
endptID = -1;
} else {
(void) memcpy((char *)&myaddr.sin_addr,(char
*)localHost->h_addr,
localHost->h_length);
if ( bind(endptID,(struct sockaddr *)&myaddr, len) == -1 ) {
printf("ERROR: Bind failed\n");
(void) close(endptID);
endptID = -1;
}
}
}
}
if ( endptID != -1 ) {
if ( listen(endptID,5) == -1 ) {
printf("ERROR: Listen failed\n");
endptID = -1;
exit(-1);
}
}
FD_ZERO(&readfds);
FD_SET(endptID, &readfds);
timeOut.tv_sec = 60;
timeOut.tv_usec = 0;
do {
printf("Watching: %d\n",endptID);
selectRtn = select(FD_SETSIZE,&readfds,(fd_set *)0,(fd_set
*)0,&timeOut);
printf("Return is: %d\n",selectRtn);
} while (selectRtn == -1 && errno == EINTR);
return 0;
}
--
==================================================================
David Brock | Software Specialist
Sterling Software | SOFIA Projects
NASA Ames Research Center | Phone: Direct: 650.604.1046
Mail Stop 207-1 | Main : 650.604.1100
Moffett Field, CA 94035-1000 | email: [EMAIL PROTECTED]
==================================================================
------------------------------
** FOR YOUR REFERENCE **
The service address, to which questions about the list itself and requests
to be added to or deleted from it should be directed, is:
Internet: [EMAIL PROTECTED]
You can send mail to the entire list (and comp.os.linux.networking) via:
Internet: [EMAIL PROTECTED]
Linux may be obtained via one of these FTP sites:
ftp.funet.fi pub/Linux
tsx-11.mit.edu pub/linux
sunsite.unc.edu pub/Linux
End of Linux-Networking Digest
******************************