Linux-Development-Sys Digest #811, Volume #7     Fri, 28 Apr 00 23:13:15 EDT

Contents:
  Re: How legal is it??? ("Mark Da Silva")
  route.c - HOW DOES IT WORK ("Tobias J�nsson")
  Re: route.c - HOW DOES IT WORK (Troutman)
  Re: Calc number of pending bytes on a socket... (Paul D. Boyle)
  Re: route.c - HOW DOES IT WORK (Kaz Kylheku)
  Re: How to replace NIC (Dave Platt)
  Shared memory (Sebastien Dessimoz)
  Re: Konfigurowanie RS'a (heniek)
  test case harness for Linux? (Douglas H. Steves)
  Re: MS caught breaking web sites ("Jon Tollerton")
  Re: Struct size and allocate problem! need help.
  Re: file operations in kernel 2.2.12 (John Brockmeyer)
  Where can I find drivers for my hp printer (Fabrice Pellichero)
  Windows Linux Admin Tools (Larry Apolonio)
  Help getting userfs working with tail -f (Yulius Tjahjadi)
  Re: Where can I find drivers for my hp printer (Bob Tennent)
  Re: MS caught breaking web sites ("anon")

----------------------------------------------------------------------------

From: "Mark Da Silva" <[EMAIL PROTECTED]>
Crossposted-To: comp.lang.c++,comp.os.linux.development.apps
Subject: Re: How legal is it???
Date: Sat, 29 Apr 2000 00:02:45 +1000

==========
In article <8e72en$84u$[EMAIL PROTECTED]>, Jim Hyslop <[EMAIL PROTECTED]>
wrote:

[snip]

>... George Orwell's book "1984" (written many years earlier) ...

Written in 1948 (first published in 1949) - he just switched the numbers for
the title to project the story into the future, creating a clever euphemism
for his allegory of the direction of the geo-politics of his time.

Cheers
Mark

=================================================================
The road of excess leads to the palace of wisdom. (William Blake)
=================================================================

------------------------------

From: "Tobias J�nsson" <[EMAIL PROTECTED]>
Crossposted-To: alt.os.linux,comp.os.linux.networking
Subject: route.c - HOW DOES IT WORK
Date: Fri, 28 Apr 2000 15:56:00 +0200

Hi

Currently I'm trying to route one incoming packet to two outgoing interfaces
(packet duplication). To do this I will probably try modifying the route.c
code. Therefore, I have the following questions:

- Can anyone point me to any kind of documentation for route.c? ...how it
works, how it gets called, etc
- Is there anyone who have done this hack before, or knows how, and where,
to do it?

Thanks in advance

Tobias J�nsson, KTH, Stockholm



------------------------------

From: [EMAIL PROTECTED] (Troutman)
Crossposted-To: alt.os.linux,comp.os.linux.networking
Subject: Re: route.c - HOW DOES IT WORK
Date: 28 Apr 2000 10:08:55 -0500

[EMAIL PROTECTED] (Tobias J�nsson) graced us with the following:

>Currently I'm trying to route one incoming packet to two outgoing
>interfaces (packet duplication). To do this I will probably try
>modifying the route.c code. Therefore, I have the following questions:

Why?  What are you trying to accomplish by routing the packet to two 
interfaces?

-- 
___________________________________________

    Mike Troutman 
         http://www.troutman.org/linux


------------------------------

From: [EMAIL PROTECTED] (Paul D. Boyle)
Crossposted-To: comp.os.linux.development.apps,comp.os.linux
Subject: Re: Calc number of pending bytes on a socket...
Date: 28 Apr 2000 13:04:51 GMT

[EMAIL PROTECTED] wrote:
: hey all,

:  How does one calculate the number of bytes to read of a received packet
: on Linux? On Solaris, I would do it this way:

:      int    pkt_len;
:      ioctl(sockno, I_NREAD, &pkt_len);

Use something like this:

include appropriate headers and other variables.

int ret;
size_t pkt_len;


    errno = 0;
    ret = ioctl( sockno, FIONREAD, (char *)&pkt_len );
    if( -1 == ret ) {
         fprintf( stderr, "%s:%d ioctl(): %s\n", __FILE__, __LINE__,
                           strerror(errno) );
    }

Paul

--
Paul D. Boyle
[EMAIL PROTECTED]
North Carolina State University
http://laue.chem.ncsu.edu/web/xray.welcome.html

------------------------------

From: [EMAIL PROTECTED] (Kaz Kylheku)
Crossposted-To: alt.os.linux,comp.os.linux.networking
Subject: Re: route.c - HOW DOES IT WORK
Reply-To: [EMAIL PROTECTED]
Date: Fri, 28 Apr 2000 15:24:07 GMT

On 28 Apr 2000 10:08:55 -0500, Troutman <[EMAIL PROTECTED]> wrote:
>[EMAIL PROTECTED] (Tobias J�nsson) graced us with the following:
>
>>Currently I'm trying to route one incoming packet to two outgoing
>>interfaces (packet duplication). To do this I will probably try
>>modifying the route.c code. Therefore, I have the following questions:
>
>Why?  What are you trying to accomplish by routing the packet to two 
>interfaces?

Perhaps multicasting to two different networks?

This is what is done by e.g. mrouted.

-- 
#exclude <windows.h>

------------------------------

From: [EMAIL PROTECTED] (Dave Platt)
Subject: Re: How to replace NIC
Date: Fri, 28 Apr 2000 17:33:34 GMT

In article <[EMAIL PROTECTED]>,
Anders Larsen  <[EMAIL PROTECTED]> wrote:

>That does not make a NE2000 compatible NIC the best choice, though.
>NE2000 is accessed through programmed I/O - no such thing as bus-master DMA
>to improve performance - CPU load gets quite high if you have a NE2000
>compatible w/ 100Base-T.
>
>A peek into drivers/net/ne.c reveals this comment:
>
>/* Ack! People are making PCI ne2000 clones! Oh the horror, the horror... */
>
>Enough said...

Agreed!

These days, you can buy cards with a decent PCI busmaster
implementation for $25-$30 if you shop around a bit.  Quite a few
companies make cards based on the DEC Tulip chipset, or on one of
several work-alike chips, and the venerable AMD Lance/PCNet
architecture is also available for PCI.  Both of these chip
architectures are capable of running the media at full speed, with a
negligible load on the CPU - quite a bit less than a NE2000 clone.

-- 
Dave Platt                                           [EMAIL PROTECTED]
Visit the Jade Warrior home page:  http://www.radagast.org/jade-warrior/
  I do _not_ wish to receive unsolicited commercial email, and I will
     boycott any company which has the gall to send me such ads!

------------------------------

Date: Fri, 28 Apr 2000 11:09:13 -0700
From: Sebastien Dessimoz <[EMAIL PROTECTED]>
Subject: Shared memory

Hi,

what is the exact meaning of the filed "shared memory" in /proc/meminfo?

Is it physical or virtual memory?
What is inside the shared memory in the Linux world? SystemV shared mem,
shared libraries, code segments?

Please could you help me to better understand this.
Thank you very much,
Sebastien


------------------------------

From: heniek <[EMAIL PROTECTED]>
Subject: Re: Konfigurowanie RS'a
Date: Fri, 28 Apr 2000 20:48:13 +0200



Adam Orcholski wrote:

> Czesc
>
> Sorry, ze tak pozno, ale mam. Porty szeregowe konfiguruje sie poleceniem
> 'setserial'. Wszystko jest pieknie opisane w man'ie, wiec nie bede sie
> powtarzal. Jakby co, to krzycz, umowimy sie u ciebie, albo u mnie i
> powalczymy razem. Wydaje mi sie, ze to powinno wystarczyc, do
> zadzialanie tej karty, jesli od strony kompa faktycznie jest
> kompatybilna z RS232.
>
> AO

Mistrzu pomylily Ci sie grupy albo poczta wylatuje Ci we wszystkie strony.



------------------------------

From: [EMAIL PROTECTED] (Douglas H. Steves)
Crossposted-To: comp.os.linux.development.apps
Subject: test case harness for Linux?
Date: 28 Apr 2000 14:00:27 -0500

Is there a test case harness for Linux? Nothing fancy, just something that
will establish a standard environment, run a set of tests and do cleanup
after each test, while keeping a tally of passes/failures.
Thanks,
Doug Steves


------------------------------

From: "Jon Tollerton" <[EMAIL PROTECTED]>
Crossposted-To: 
comp.os.linux.advocacy,comp.os.ms-windows.advocacy,comp.os.ms-windows.nt.advocacy,comp.os.linux.networking,comp.os.ms-windows.networking.tcp-ip,alt.conspiracy.area51
Subject: Re: MS caught breaking web sites
Date: Fri, 28 Apr 2000 14:59:16 -0400

I do have two NT machines that do take about five minutes to boot up, but
the things have 512 MB of Ram and a 104 GB fibre channel SCSI RAID array.
It takes a long time to initialize that BEFORE it gets to NTLDR.

"Sean LeBlanc" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
>
> Couldn't agree more. NT 4.0 workstation is a desktop (or tower :) )
> OS by most people's definition. I've been using NT workstation
> at jobs I've had since 1995. I've been using it at home since
> 1996. It has never (under ordinary circumstances)
> taken me five minutes to boot or shutdown,
> and I have 3 SCSI components in my system. Got news for you:
> a similarly loaded setup of RedHat 6.1 and NT 4.0 workstation
> take roughly the same time to load; I've timed them some time
> ago just out of curiousity...both under a minute, including
> time from power on to a logon screen.
> To be fair, yes, RedHat has many more services out of the
> box than NT has, and I was running the "graphical boot" in
> RedHat.
>
> I'd time it again to get exact seconds, but my current install
> would be unfair - Linux is on IDE right now, and WinNT resides
> on SCSI.
>
> I'm not sure why the original claim was even made, it makes
> no sense to me.
>
> I've seen NT have problems with weird states and getting
> it to shutdown gracefully may be impossible (yesterday I
> saw it "lose" connection to domain, apparently, and not
> allow login, even though I know domain admin password,
> and it supposedly caches that data - odd; had to hard
> re-boot, ie, reset button) or lengthy, but
> under normal conditions, both the workstation and server
> of NT 4.0 start up and shut down WAY under 5 minutes.
>
> M$ products clearly have issues, and I'm not contesting
> that, but let's get serious: NT 4.0 is a desktop OS, and
> there is no doubt about that. Now, if someone were to say
> NT 4.0 server is not a server OS, that might be debatable.
> Can't speak for Win2K, haven't seen it used extensively.
>
> "Christopher Smith" <[EMAIL PROTECTED]> writes:
>
> > "Rasputin" <[EMAIL PROTECTED]> wrote in message
> > news:[EMAIL PROTECTED]...
> > > Scott Zielinski wrote:
> > > > > If its a "NT replacement" is not on the desktop.  In the real
world,
> > NT is
> > > > > not a desktop OS.
> > > > That's absolutly, completely, untrue. Ever hear of "NT Workstation?"
If
> > > > that isn't a desktop OS....
> > >
> > > A 'desktop OS' boots in less than 5 minutes. A 'desktop OS' takes less
> > > than 5 minutes to shut down. Nuff said.
> >
> > Thus easily allowing NT to be a "desktop OS".
> >
> > If you've got an NT *Workstation* install that's taking that long to
boot
> > and shut down, you have serious problems.



------------------------------

Crossposted-To: 
alt.os.linux,comp.os.linux.development.apps,comp.unix.sco.misc,comp.unix.sco.programmer,comp.unix.unixware.misc,tw.bbs.comp.linux
Subject: Re: Struct size and allocate problem! need help.
From: [EMAIL PROTECTED] ()
Date: 28 Apr 2000 19:00:35 GMT

In article <[EMAIL PROTECTED]>,
Bernd Strieder  <[EMAIL PROTECTED]> wrote:
>Maruthi Vinjamuri wrote:
>> >     I encounter a compiling program as below:
>> >
>> >     struct    a {
>> >         unsigned char    a1;
>> >         unsigned char    a2;
>> >         unsigned short    a3
>> >         unsigned short    a4
>> >         unsigned long    a5;
>> >     };
>> >
>> > the structure size must be 10 but use sizeof print out is 12...
>> > I know this is the alignment problem of structure ..
>> > But how to resolve it ?
>> > I need to know the compiler option like -xx ?
>> > do anyone konw about this ?
>
>How about putting that structure into an char[10] and access the bytes
>as needed. This problem usually occurs when exchanging data between
>systems with different binary formats. There are issues as network and
>host byte order as well. If you aim at portability, try to convert the
>data to a portable non-binary format in between the participating
>systems. If this is not possible, the char[10] is the ugly last resort,
>a typical hack to accomodate to something you have no influence on.
>

You don't want to do this with a compiler option. That will
affect all structures in your program this way (and you really
don't want that) and is a good way to have someone build your
software and forget to use the option and cause all kids of
disasters.

You also don't want to use a character array unless this is
strictly necessary. Strict typing is your friend.

Most compilers that I've used have a pragma for specifically
this purpose. If yours does, then some code like:


#pragma pack (1)
struct   a {
   unsigned char    a1;
   unsigned char    a2;
   unsigned short    a3;
   unsigned short    a4;
   unsigned long    a5;
};
#pragma pack ()

in the header file where the structure is defined will do
the trick. Read your compiler's documentation to see if this
is supported.



--
Dave Eisen                               Sequoia Peripherals: (408) 752-1400
[EMAIL PROTECTED]                       FAX:                 (408) 752-2707
   In our society, you can state your views, but they have to be correct.
      ---  Ernie Hai, coordinator Singapore Gov't Internet Project.

------------------------------

From: John Brockmeyer <[EMAIL PROTECTED]>
Subject: Re: file operations in kernel 2.2.12
Date: Fri, 28 Apr 2000 12:58:24 -0600

the offset in the read() and write() methods is used by pread(2) and pwrite(2).
the position(seek) before reading or writing

getting the inode pointer is another matter. It is found thru the dentry

struct file *f;
f->f_dentry->d_inode gets you a pointer to the inode.

Mike Ohlsen wrote:

> I am doing some char device driver writing and have a few questions about
> the file operations for read and write. . .
>
> The file device functions take four items as seen here:
>
> static ssize_t device_read(
>     struct file *file,
>     char *buffer, /* The buffer to fill with the data */
>     size_t length,     /* The length of the buffer */
>     loff_t *offset)
>
> What exactly is the loff_t *offset?  Is it an offset into the file (first
> item passed in)?  What does the offset point to?
>
> In earlier kernel versions, the inode was passed into the read and write
> functions, but in 2.2 and greater, it uses the offset.  How do I use this
> offset to get the inode pointer?
>
> Thanks!!




------------------------------

From: Fabrice Pellichero <[EMAIL PROTECTED]>
Subject: Where can I find drivers for my hp printer
Date: Fri, 28 Apr 2000 23:06:03 +0200
Reply-To: [EMAIL PROTECTED]

Hi everybody,

I'm a brand new user of Linux and when I installed Caldera Opnlinux2.3,
I didn't found the driver for my HP printer which is a: HP Deskjet
970Cxi

Where an I find it ? because you will understand that I would not
appreciate to need to buy another one.

Thanks.

Fabrice.




------------------------------

From: [EMAIL PROTECTED] (Larry Apolonio)
Subject: Windows Linux Admin Tools
Date: Fri, 28 Apr 2000 21:27:21 GMT

I want to develop a set of Windows Utilities to Administer a Linux
Box.

I know I can Telnet or use LinuxConf in a web browser,  but I was just
thinking that a set of Linux Tools for Windows would be nice like
LinuxConf for Windows or for you NT guys, User Admin for Linux, or DNS
Manager. (note the play on words).  IPChains would be nice.  Samba
Admin.  

Some of my goals is to Lower the Total Cost of Ownership, simplify
administration of Linux Servers, and get more acceptance of Linux
Servers from the NT community.

Just wanted some comments on my little project.

Are there any utilities that already exist?

I would like to write it in Borland/Inprise Delphi 5.0 Professional,
anyone know where I can get a Free Legit copy?

Any general comments?

Any venture capitalists? ;-)

I'm working on a model now, hopefully, when I do get a copy of Delphi
Pro I can come out with a prototype you people can test.  

Please email me at [EMAIL PROTECTED]

Remove the nospam.

Thanks,
Larry

------------------------------

From: Yulius Tjahjadi <[EMAIL PROTECTED]>
Subject: Help getting userfs working with tail -f
Date: Fri, 28 Apr 2000 23:05:27 GMT

I'm having problems getting tail -f to work with a user mounted fs.
I've overloaded all the inode_operations functions as well as
the file_operations structure in <linux/fs.h>.  When I do a tail -f,
no messages are sent to the kernel.

My basic question is how tail -f should work with other distributed
filesystems, like NFS.  What kernel messages should I be looking for?
When would something like this be cached in the kernel and not be sent
to the filesystem?  Thanks for any help on this matter.

yulius

------------------------------

From: [EMAIL PROTECTED] (Bob Tennent)
Subject: Re: Where can I find drivers for my hp printer
Date: 29 Apr 2000 00:54:55 GMT
Reply-To: [EMAIL PROTECTED]

On Fri, 28 Apr 2000 23:06:03 +0200, Fabrice Pellichero wrote:
 >
 >I'm a brand new user of Linux and when I installed Caldera Opnlinux2.3,
 >I didn't found the driver for my HP printer which is a: HP Deskjet
 >970Cxi
 >
 >Where an I find it ? because you will understand that I would not
 >appreciate to need to buy another one.
 >
Is that anything like the 970Cse?  Check out

http://www.picante.com/~gtaylor/pht/show_printer.cgi?recnum=221001

Bob T.

------------------------------

From: "anon" <[EMAIL PROTECTED]>
Crossposted-To: 
comp.os.linux.advocacy,comp.os.ms-windows.advocacy,comp.os.ms-windows.nt.advocacy,comp.os.linux.networking,comp.os.ms-windows.networking.tcp-ip,alt.conspiracy.area51
Subject: Re: MS caught breaking web sites
Date: Sat, 29 Apr 2000 02:16:57 GMT

At least NTFS doesnt chew large holes in files when it re-starts after a
crash ......... ho hum :-)

Jon Tollerton wrote in message ...
>I do have two NT machines that do take about five minutes to boot up, but
>the things have 512 MB of Ram and a 104 GB fibre channel SCSI RAID array.
>It takes a long time to initialize that BEFORE it gets to NTLDR.
>
>"Sean LeBlanc" <[EMAIL PROTECTED]> wrote in message
>news:[EMAIL PROTECTED]...
>>
>> Couldn't agree more. NT 4.0 workstation is a desktop (or tower :) )
>> OS by most people's definition. I've been using NT workstation
>> at jobs I've had since 1995. I've been using it at home since
>> 1996. It has never (under ordinary circumstances)
>> taken me five minutes to boot or shutdown,
>> and I have 3 SCSI components in my system. Got news for you:
>> a similarly loaded setup of RedHat 6.1 and NT 4.0 workstation
>> take roughly the same time to load; I've timed them some time
>> ago just out of curiousity...both under a minute, including
>> time from power on to a logon screen.
>> To be fair, yes, RedHat has many more services out of the
>> box than NT has, and I was running the "graphical boot" in
>> RedHat.
>>
>> I'd time it again to get exact seconds, but my current install
>> would be unfair - Linux is on IDE right now, and WinNT resides
>> on SCSI.
>>
>> I'm not sure why the original claim was even made, it makes
>> no sense to me.
>>
>> I've seen NT have problems with weird states and getting
>> it to shutdown gracefully may be impossible (yesterday I
>> saw it "lose" connection to domain, apparently, and not
>> allow login, even though I know domain admin password,
>> and it supposedly caches that data - odd; had to hard
>> re-boot, ie, reset button) or lengthy, but
>> under normal conditions, both the workstation and server
>> of NT 4.0 start up and shut down WAY under 5 minutes.
>>
>> M$ products clearly have issues, and I'm not contesting
>> that, but let's get serious: NT 4.0 is a desktop OS, and
>> there is no doubt about that. Now, if someone were to say
>> NT 4.0 server is not a server OS, that might be debatable.
>> Can't speak for Win2K, haven't seen it used extensively.
>>
>> "Christopher Smith" <[EMAIL PROTECTED]> writes:
>>
>> > "Rasputin" <[EMAIL PROTECTED]> wrote in message
>> > news:[EMAIL PROTECTED]...
>> > > Scott Zielinski wrote:
>> > > > > If its a "NT replacement" is not on the desktop.  In the real
>world,
>> > NT is
>> > > > > not a desktop OS.
>> > > > That's absolutly, completely, untrue. Ever hear of "NT
Workstation?"
>If
>> > > > that isn't a desktop OS....
>> > >
>> > > A 'desktop OS' boots in less than 5 minutes. A 'desktop OS' takes
less
>> > > than 5 minutes to shut down. Nuff said.
>> >
>> > Thus easily allowing NT to be a "desktop OS".
>> >
>> > If you've got an NT *Workstation* install that's taking that long to
>boot
>> > and shut down, you have serious problems.
>
>



------------------------------


** 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.development.system) 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-Development-System Digest
******************************

Reply via email to