Linux-Development-Sys Digest #596, Volume #8     Thu, 29 Mar 01 06:13:09 EST

Contents:
  how add the cramfs filesystem in the linux 2.2.26? ("Leo Naboro")
  Intel i810 Xserver (XFCom_i810) (Aminudin Khalid)
  Re: How to call a function and don't wait for return (Arne Driescher)
  Re: what means pgrp in the task struct ? (Benjamin Lussier)
  Re: Ojbect files generated by GCC and G++ can not be linked together (Petric Frank)
  Re: wipeinfo, secure delete, device driver ([EMAIL PROTECTED])
  Shared libs and memory usage (Giuliano Pochini)
  Re: opening ethernet as a raw device ([EMAIL PROTECTED])
  Re: opening ethernet as a raw device ([EMAIL PROTECTED])
  Re: Question about ethertap device ([EMAIL PROTECTED])
  Re: How to handle newline character(s) in a TCP server (Michel Bardiaux)
  Re: how add the cramfs filesystem in the linux 2.2.26? ("Leo Naboro")
  Re: computer input/output devices (Alan Donovan)
  Re: computer input/output devices (Alan Donovan)
  Re: Question about ethertap device (Jimmy)

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

From: "Leo Naboro" <[EMAIL PROTECTED]>
Subject: how add the cramfs filesystem in the linux 2.2.26?
Date: Thu, 29 Mar 2001 15:18:29 +0800

hi,i wanna add the cramfs filesystem into my redhat 7.0 kernel(linux
2.2.26),how should i do that? Can someone give some suggestion? thanks!
                          leo naboro



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

From: Aminudin Khalid <[EMAIL PROTECTED]>
Subject: Intel i810 Xserver (XFCom_i810)
Date: Thu, 29 Mar 2001 23:30:55 +0800
Reply-To: [EMAIL PROTECTED]

Hi,

I need to modify the X Server for Intel i810 chipset VGA controller .
I've  tried to find the source code from Intel's support website but I
only found the RPM binaries and  the patch file.

If you have the source code  or any related information , please send it
to me ASAP.

Thanks.



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

From: Arne Driescher <[EMAIL PROTECTED]>
Subject: Re: How to call a function and don't wait for return
Date: Thu, 29 Mar 2001 09:37:57 +0200

Ulrich Eckhardt wrote:
> 
> tlin wrote:
> 
> > hi,
> >
> > I want to initialize some functions when I load my module into the kernel.
> > These functions need to share some common data within this module,
> > and basically, they will never end until the module is terminated.
> >
> > I don't know whether it is possible? If yes, then how to implement it?
> > Thanks a lot!
> >
> >
> 
> Better steal well than invent poorly:
> Iirc, the Linux-USB stuff uses a thread to monitor the attached devices,
> you might have a look at their code. (If it wasn't USB, it was Cardservice,
> I really don't remember...)
> 
> uli

Perhaps this will help you:
http://www.linux-mag.com/2000-12/gear_01.html

-Arne

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

From: Benjamin Lussier <[EMAIL PROTECTED]>
Subject: Re: what means pgrp in the task struct ?
Date: Thu, 29 Mar 2001 09:34:29 +0200
Reply-To: [EMAIL PROTECTED]

Kasper Dupont wrote: 
> It is always the init task who inherrits children
> of dead tasks.
What then of the following comment (and code) in kernel/exit.c ?

148  * When we die, we re-parent all our children.
149  * Try to give them to another thread in our process
150  * group, and if no such member exists, give it to
151  * the global child reaper process (ie "init")
152  */
153 static inline void forget_original_parent(struct task_struct *
father)
154 {
155         struct task_struct * p, *reaper;
156 
157         read_lock(&tasklist_lock);
158 
159         /* Next in our thread group */
160         reaper = next_thread(father);
161         if (reaper == father)
162                 reaper = child_reaper;
(child_reaper = init)

> I think there are also some special rules about
> sending signals where you can send signals to
> processes in your group even if the UID does not
> match. 
>(Correct me if I'm wrong about this.)
I bet I'm not knowledgeable enough to do that :P

-- 

> `Have you guessed the riddle yet?' the Hatter said, turning to Alice again. 
> `No, I give it up,' Alice replied: `what's the answer?' 
> `I haven't the slightest idea,' said the Hatter.

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

From: Petric Frank <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps
Subject: Re: Ojbect files generated by GCC and G++ can not be linked together
Date: Thu, 29 Mar 2001 08:31:11 +0100

Hello,

you should place

#ifdef __cplusplus
extern "C" {
#endif

at the beginning (after the include statements in it) and

#ifdef __cplusplus
}
#endif

at the end of the include file (*.h) to be used by the c++ program.
This enables the *.h file to be used from c and c++. You don't have to
know anymore whether the the called function is of c or c++ style.

regards
  Petric

"Arthur H. Gold" wrote:
> 
> [EMAIL PROTECTED] wrote:
> >
> > Hello,
> >
> > I'm trying to link some C++ code with a C library.  The C library is
> > compiled with Gcc on Linux (RedHat 7.0) while the C++ code is compiled
> > with g++.  Individual files all compile ok but linking with G++ fails.
> > All the C functions come up as undefined reference.
> >
> > The manual page of gcc/g++ refers to C sytle linking and C++ style
> > linking.  What's the difference?  How do you make them work?
> >
> > Your comments and suggestions are much appreciated.
> >
> In `C' style linking, what you see is what you get, i.e. if
> you have a function called `foo', that's also its name as
> far as the linker is concerned. C++ on the other hand,
> because of the fact that you can overload functions with
> different signatures, does `name-mangling' which encodes the
> argument types in the name that's exposed to the linker.
> 
> The simplest way of getting this to work would be to do the
> following in C++ code that uses C-linked functions (we
> assume that the prototypes for these functions are in a
> header file called "myCheaders.h"
> 
> ...
> extern "C" {
> #include 'myCheaders.h"
> }
> .....
> 
> This ensures that you can call C functions by their normal
> names (and correspondingly you'll be able to link them).
> 
> HTH,
> --ag
> --
> Artie Gold, Austin, TX  (finger the cs.utexas.edu account
> for more info)
> mailto:[EMAIL PROTECTED] or mailto:[EMAIL PROTECTED]
> --
> Clone Bernie!

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

From: [EMAIL PROTECTED]
Subject: Re: wipeinfo, secure delete, device driver
Date: Thu, 29 Mar 2001 09:58:37 +0200

[EMAIL PROTECTED] wrote:
> "Kevin B. Haywood" <[EMAIL PROTECTED]> writes:
>> I found a program called badblocks that tests the drive surface by writing
>> one's, zero's, and a checkerboard pattern. This fits the requirements of
>> the computer security department. Everybody is happy now.

> One possible fly in the ointment to consider:

> If the drive controller implements its own "bad block" counter that
> remaps blocks it notices are bad to a region of the disk reserved as
> "extra blocks," it is possible that the drive may be unable to
> continue to access the blocks that "went bad."  

> The blocks marked "bad" may still have some data on them even though
> they are damaged, and it is not clear that you can do anything to try
> to erase _that_ data...

Moreover it is well known - and documented in a nice article on the web,
for which i don't unfortunately have reference - that there exists
special equipment which allows to read overwrited data on the disk.
It works by having a very sensitive head reading slightly on the
border of tracks. So if you really have to erase files on a disk
to the point that nobody can read it, there is no other way than
physically destroy the platters. If you are happy with moderate security
that is you expect that nobody will dismount your disk to get the
platter and put it in such apparatus, then i don't see why
dd if=/dev/zero of=/dev/hda? would not be sufficient. On the other hand
simply deleting the file is insufficient since Linux, i think, does
not zero out the blocks of the file. This allows to sometimes recover
files inadvertantly deleted. There has recently appeared a security
notice on freebsd precisely on this subject. If i remember well,
the kernel has been modified to zero out all blocks of a deleted
file. Of course if this is really done, you cannot any more recover
in any way deleted files, which may be bad.



> -- 
> (reverse (concatenate 'string "ac.notelrac.teneerf@" "454aa"))
> http://vip.hex.net/~cbbrowne/resume.html
> "It is always convenient to have  villains whom you can have no qualms
> about seeing  shot, blown up, or  run over by  large man-made objects;
> the Gestapo are particularly appropriate for this."  -- Jeff Meyer

-- 
Michel Talon

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

From: Giuliano Pochini <[EMAIL PROTECTED]>
Subject: Shared libs and memory usage
Date: Thu, 29 Mar 2001 10:37:53 +0200


Hi!

I wrote a cgi that uses a library. I recompiled the library
as shared in the attempt to reduce memory usage (I have up
to 400 of this cgi's running at the same time), but it
doesn't.... it even uses a few KB more. Shouldn't the library
text be shared between tasks ?  Why it doesn't ?  I only gain
a bit of disk space, but it isn't really an issue here.

Bye.

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

From: [EMAIL PROTECTED]
Subject: Re: opening ethernet as a raw device
Date: Thu, 29 Mar 2001 08:48:37 -0000

On Wed, 28 Mar 2001 21:15:16 -0000 [EMAIL PROTECTED] wrote:

|>Is there any way to open an ethernet as a raw device, not bridged?
|
| Have you looked at the socket man page?

Yes.  But nothing along these lines is mentioned.

-- 
=================================================================
| Phil Howard - KA9WGN |   Dallas   | http://linuxhomepage.com/ |
| [EMAIL PROTECTED] | Texas, USA | http://phil.ipal.org/     |
=================================================================

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

From: [EMAIL PROTECTED]
Subject: Re: opening ethernet as a raw device
Date: Thu, 29 Mar 2001 09:01:15 -0000

On Wed, 28 Mar 2001 22:12:44 GMT in <wltw6.6515$[EMAIL PROTECTED]> you wrote:

|>Is there any way to open an ethernet as a raw device, not bridged?
|
| Not sure what you mean by "not bridged"

I don't want to have to configure bridging between the ethernet
interface, such as eth0, to some other interface, such as tap0.


|>My process should be able to write() outgoing frames, and receive
|>all frames addressed to this NIC, all broadcast frames, and if in
|>promiscuous mode, all frames period.  None should go anywhere else.
|
| Getting all the packets can be done.  Take a look at the
| packet man page and/or sources for libpcap.  Or just use
| libpcap to get the frames (man pcap).

It should be simpler that all the libpcap complexity.  If it
were a device, I could simply read() and write() (with some
ioctl() thrown in for good measure).


| The "none go anywhere else" part is going to be tricky, I
| think. The way the kernel currently works, I think you (or the
| pcap library) just get _copys_ of packets and you can do with
| them as you wish, but I don't remember that there is a way to
| tell the kernel not to give other copies to anybody else.

Something like BSD's bpf would be almost that.  I could probably
make sure no other processes can open the interface by using some
kind of lock.  But I also want to make sure I can write() an
ethernet frame that is larger than the usual allowed sizes.  The
purpose is to be able to implement certain VLAN protocols that use
larger than normal frames.  But I want to do it in process space.
I'm planning to tunnel the whole VLAN protocol elsewhere via SSH.


|>A serial port is easy since there is a /dev node device file to open.
|>But an ethernet doesn't have one of those, and I could not find any
|>major/minor numbers for it in the list.  The kernel source code does
|>not seem to give anything along this line.
|
| $ man packet

Is this really that low a level?  It reads like it isn't.

-- 
=================================================================
| Phil Howard - KA9WGN |   Dallas   | http://linuxhomepage.com/ |
| [EMAIL PROTECTED] | Texas, USA | http://phil.ipal.org/     |
=================================================================

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

From: [EMAIL PROTECTED]
Subject: Re: Question about ethertap device
Date: Thu, 29 Mar 2001 09:13:11 -0000

On Thu, 29 Mar 2001 14:50:40 +0800 Jimmy <[EMAIL PROTECTED]> wrote:

|     Just want to ask if some packets are redirected to the ethertap
| device will they be processed by the system automatically? Say, if I
| send some ping packets to the ethertap interface(eg. /dev/tap0), will
| they get the
| replies automatically?

Depends on which end you are referring to.

There are two ends.  One is the interface called "tap0" and the
other is the corresponding device usually called "/dev/tap0".

A process opens "/dev/tap0" and configures "tap0" with an address
and network mask.  To be useful, the netmask must be 255.255.255.252
or less.  If you address the pings to the address configured on the
interface itself, you should get a response back because it is one
of the interfaces for this machine.  However, if you address the
pings to some other address in the subnet configured, with proper
routing to make sure the packets go out the tap0 interface, the
kernel will not make replies to that packet, but just send it on
to the process reading "/dev/tap0".  That process could do whatever
it wants, such as tunnel it over to some other network.

If you are referring to the process writing "/dev/tap0" via the
fd it has open for it, and assuming the packet is formed right,
and the routing and configuration is all right, then whether or
not you get a response depend on where it was sent.  If it is
addressed to the address of the "tap0", it may or may not be
responded to.  But if addressed to 127.0.0.1 I would think it
would be responded to.

-- 
=================================================================
| Phil Howard - KA9WGN |   Dallas   | http://linuxhomepage.com/ |
| [EMAIL PROTECTED] | Texas, USA | http://phil.ipal.org/     |
=================================================================

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

From: Michel Bardiaux <[EMAIL PROTECTED]>
Crossposted-To: comp.unix.programmer,comp.os.linux.development.apps
Subject: Re: How to handle newline character(s) in a TCP server
Date: Thu, 29 Mar 2001 09:26:20 GMT

InterFan wrote:
> 
> I want to design a TCP server. It just receives a line from client and
> handles it. Then, it sends the response back to the client. The
> problem is that a line of message may end with ASCII characeter 13, 10
> or 13+10. I use blocking I/O function. How can I handle these
> conditions smoothly.
> 
> Thank a lot.
> 
> Best Regards,
> Chuan He

If '\r' ends a line, then the sequence '\r''\n' is ambiguous, is it one
or 2 lines, the 2nd one being empty?

-- 
Michel Bardiaux
Peaktime Belgium S.A.  Rue Margot, 37  B-1457 Nil St Vincent
Tel : +32 10 65.44.15  Fax : +32 10 65.44.10

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

From: "Leo Naboro" <[EMAIL PROTECTED]>
Subject: Re: how add the cramfs filesystem in the linux 2.2.26?
Date: Thu, 29 Mar 2001 17:59:08 +0800

I do these steps:

1. copy the cramfs directory to the
    usr/src/linux/fs/
2. then i vi the fs/Makefile and Config.in
3  and i vi the Rules.make
4 and i vi the include/linux/autoconf.h
  during the make bzImage,there is no error.
  after reboot,the kernel still not support the cramfs filesystem...
  what other files that i should modify?Thank anyone's suggestion!
                        Leo Naboro

===== Original Message =====
From: "Leo Naboro" <[EMAIL PROTECTED]>
Newsgroups: comp.os.linux.development.apps
Sent: Thursday, March 29, 2001 3:18 PM
Subject: i wanna add cramfs in the kernel 2.2


> hi,i wanna add the cramfs filesystem into my redhat 7.0 kernel(linux
> 2.2.26),how should i do that? Can someone give some suggestion? thanks!
>                           leo naboro
>
>



"Leo Naboro" <[EMAIL PROTECTED]> wrote in message
news:99uncg$fbr$[EMAIL PROTECTED]...
> hi,i wanna add the cramfs filesystem into my redhat 7.0 kernel(linux
> 2.2.26),how should i do that? Can someone give some suggestion? thanks!
>                           leo naboro
>
>



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

From: Alan Donovan <[EMAIL PROTECTED]>
Subject: Re: computer input/output devices
Date: Wed, 28 Mar 2001 09:35:35 +0100

carla wrote:
> 
> I would like to know the definition and history of the different
> input /output devices of the computer

Not really a Linux system development question, but anyway...


Read "Modern Operating Systems" by Andy Tannenbaum,
pub. Prentice Hall International. He covers the workings
and history and software issues for most peripherals.

alan

-- 
Alan Donovan, ARM Research, ARM Ltd.        [EMAIL PROTECTED]

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

From: Alan Donovan <[EMAIL PROTECTED]>
Subject: Re: computer input/output devices
Date: Wed, 28 Mar 2001 09:36:45 +0100

Alan Donovan wrote:
> 
> carla wrote:
> >
> > I would like to know the definition and history of the different
> > input /output devices of the computer
> 
> Not really a Linux system development question, but anyway...
> 
> Read "Modern Operating Systems" by Andy Tannenbaum,
> pub. Prentice Hall International. He covers the workings
> and history and software issues for most peripherals.

I forgot to mention: "available in all good CS bookshops
and libraries."  This is a standard course text, well written
and widely available.


-- 
Alan Donovan, ARM Research, ARM Ltd.        [EMAIL PROTECTED]

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

From: Jimmy <[EMAIL PROTECTED]>
Subject: Re: Question about ethertap device
Date: Thu, 29 Mar 2001 18:34:43 +0800

Thx for your reply.

Actually, I am trying to work with a demo program (show_pings.c of
libfw-0.2 written by Paul Russel). The
author stated that the show_pings program can block all the even-length
ping packets only replies the
odd-length ping packets. It works by reading the packets from
/dev/fwmonitor. Then if odd-length ping
packets are found, they are reinjected through the ethertap interface. And
he stated in the readme.txt that
"NOTE THAT REINJECTING PACKETS INTO ETHERTAP WITH A SRC IP EQUAL TO AN
EXISTING INTERFACE WILL FAIL, due to internal Linux Kernel sanity
checks.  This means in particular that the case of catching and
reinjecting input packets to the `lo' interface won't work."

Then I followed the instruction to compile my kernel with
CONFIG_IP_FIREWALL,
CONFIG_IP_FIREWALL_NETLINK and CONFIG_ETHERTAP set. And then I do the
following:
   mknod -m 666 /dev/tap0 36 16
   /sbin/ifconfig tap0 192.168.0.1 netmask 255.255.255.0 arp

But I simply can not get the stated results. I have noticed that tap0 has
received those ping packets (an
increase in the number of packet received in the statistics shown by
ifconfig). But simply no reply was
obtained from the pinging side. That's why I ask the above question. I
really want to know what's wrong with
my settings? I have read the /documentation/networking/ethertap.txt, but I
simply don't know how to set my
ethertap device properly. Can you kindly give me some directions about
that?

Thx in advance.

Jimmy



[EMAIL PROTECTED] wrote:

> On Thu, 29 Mar 2001 14:50:40 +0800 Jimmy <[EMAIL PROTECTED]> wrote:
>
> |     Just want to ask if some packets are redirected to the ethertap
> | device will they be processed by the system automatically? Say, if I
> | send some ping packets to the ethertap interface(eg. /dev/tap0), will
> | they get the
> | replies automatically?
>
> Depends on which end you are referring to.
>
> There are two ends.  One is the interface called "tap0" and the
> other is the corresponding device usually called "/dev/tap0".
>
> A process opens "/dev/tap0" and configures "tap0" with an address
> and network mask.  To be useful, the netmask must be 255.255.255.252
> or less.  If you address the pings to the address configured on the
> interface itself, you should get a response back because it is one
> of the interfaces for this machine.  However, if you address the
> pings to some other address in the subnet configured, with proper
> routing to make sure the packets go out the tap0 interface, the
> kernel will not make replies to that packet, but just send it on
> to the process reading "/dev/tap0".  That process could do whatever
> it wants, such as tunnel it over to some other network.
>
> If you are referring to the process writing "/dev/tap0" via the
> fd it has open for it, and assuming the packet is formed right,
> and the routing and configuration is all right, then whether or
> not you get a response depend on where it was sent.  If it is
> addressed to the address of the "tap0", it may or may not be
> responded to.  But if addressed to 127.0.0.1 I would think it
> would be responded to.
>
> --
> -----------------------------------------------------------------
> | Phil Howard - KA9WGN |   Dallas   | http://linuxhomepage.com/ |
> | [EMAIL PROTECTED] | Texas, USA | http://phil.ipal.org/     |
> -----------------------------------------------------------------


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


** 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 by posting to the
comp.os.linux.development.system newsgroup.

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