Linux-Development-Sys Digest #595, Volume #8     Thu, 29 Mar 01 02:13:13 EST

Contents:
  Re: opening ethernet as a raw device
  Re: Module debugging
  creating an RPM, question (Jeff Lacki)
  Re: opening ethernet as a raw device (Grant Edwards)
  Re: wipeinfo, secure delete, device driver ("Kevin B. Haywood")
  Re: wipeinfo, secure delete, device driver ([EMAIL PROTECTED])
  Ojbect files generated by GCC and G++ can not be linked together 
([EMAIL PROTECTED])
  Re: wipeinfo, secure delete, device driver (Dave Platt)
  Re: Parallel Port ("S. Miller")
  Re: Ojbect files generated by GCC and G++ can not be linked together ("Arthur H. 
Gold")
  Re: Ojbect files generated by GCC and G++ can not be linked together (Carlos Moreno)
  why it should be changed  to 36?? ("hushui")
  Re: I need a detailed documentation about TTY (Madhava S Bhamy)
  How to handle newline character(s) in a TCP server (InterFan)
  Re: How to call a function and don't wait for return (Ulrich Eckhardt)
  Re: Change in PPP handling from 2.4.0 to 2.4.1? (Madhava S Bhamy)
  Re: Ojbect files generated by GCC and G++ can not be linked together (Erik Max 
Francis)
  Question about ethertap device (Jimmy)

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

From: [EMAIL PROTECTED] ()
Subject: Re: opening ethernet as a raw device
Date: Wed, 28 Mar 2001 21:15:16 -0000

In article <[EMAIL PROTECTED]>,
 <[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?

--
http://www.spinics.net/linux

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

From: [EMAIL PROTECTED] ()
Subject: Re: Module debugging
Date: Wed, 28 Mar 2001 21:22:26 -0000

In article <[EMAIL PROTECTED]>,
S. Miller <[EMAIL PROTECTED]> wrote:

>I'm writing a usb driver for a video sensor my company will be releasing
>later this Spring.  It currently gets a segv in the initialization
>sequence.  When this happens the module is left loaded but owned by
>"initialization".  It refuses to be rmmoded (module busy) and of course
>I can't do another insmod.  Is there any way short of a reboot to clear
>this?

Sometimes making an ioctl that clears the in use count will work.  But
if you bombed out in the initialization, there's a good chance you won't
be able to get to the ioctl function.  

But chances are you'll be wanting to reboot after the segv anyway.  During
driver debugging I all too often found the kernel to be a bit unstable if
my driver aborted with a seg fault.

--
http://www.spinics.net/linux

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

From: Jeff Lacki <[EMAIL PROTECTED]>
Subject: creating an RPM, question
Date: 28 Mar 2001 21:26:25 GMT

When I try to build an RPM, I get an error:

Requires: ld-linux.so.2 libc.so.6 libgdbm.so.2 libglib-1.2.so.0 libgtop.so.1 
libgtop_common.so.1 libgtop_sysdeps.so.1 libm.so.6 libc.so.6(GLIBC_2.0) 
libc.so.6(GLIBC_2.1)
ERROR: GTOP RPM build failed

The last ERROR is from my script which tries to build it.

All I want my RPM to do it package up some files and place
them into a directory when its installed, nothing more,
nothing less. 

The "Requires" line is looking (apparently) for libraries,
can I disable this somehow?

My spec file:

Summary: The package GTOP-0.10
Name: my_GTOP-0.10
Version: 0.10
Release: 1
Distribution: my stuff 
Copyright: none
Vendor: Me
Packager: [EMAIL PROTECTED]
Group: Applications/Multimedia
ExclusiveOS: Linux

Prefix: /usr/lib/perl5/site_perl/5.005/i386-linux

%description
Perl Module GTOP-0.10 bundled into an RPM

%files
%attr(755, root, bin) /usr/lib/perl5/site_perl/5.005/i386-linux/GTop
%attr(755, root, bin) /usr/lib/perl5/site_perl/5.005/i386-linux/auto/GTop
%attr(755, root, bin) /usr/lib/perl5/site_perl/5.005/i386-linux/auto/GTop/Server

# Do post-install scripts
%post

echo "************************************"
echo "** GTOP-0.10 Installation successful"
echo "************************************"

and the RPM build line:

rpm -bb -v --buildroot=/home/me/gtop_rpm/files spec.txt

Any advice is appreciated.

TIA
Jeff


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

From: [EMAIL PROTECTED] (Grant Edwards)
Subject: Re: opening ethernet as a raw device
Date: Wed, 28 Mar 2001 22:12:44 GMT

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

>Is there any way to open an ethernet as a raw device, not bridged?

Not sure what you mean by "not bridged"

>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).

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.

>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

-- 
Grant Edwards                   grante             Yow!  I guess it was all a
                                  at               DREAM... or an episode of
                               visi.com            HAWAII FIVE-O...

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

From: "Kevin B. Haywood" <[EMAIL PROTECTED]>
Subject: Re: wipeinfo, secure delete, device driver
Date: Wed, 28 Mar 2001 19:02:04 -0500

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.
  Kevin

Paul Repacholi wrote:

>
> Talk to the COMSEC officer for the site. He will have to sign it off,
> and a simple over writing with zero is not enough for most
> clasifications. You will need to use several patterns, several times.
> The COMSEC officer is god. He is the one who enforces the rules and
> can tell you what needs to be done, and the audit trail you need to
> keep to prove it has been done.
>
> --
> Paul Repacholi                               1 Crescent Rd.,
> +61 (08) 9257-1001                           Kalamunda.
>                                              West Australia 6076
> Raw, Cooked or Well-done, it's all half baked.


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

From: [EMAIL PROTECTED]
Subject: Re: wipeinfo, secure delete, device driver
Date: Thu, 29 Mar 2001 01:00:30 GMT

"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...
-- 
(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

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

From: [EMAIL PROTECTED]
Crossposted-To: comp.os.linux.development.apps
Subject: Ojbect files generated by GCC and G++ can not be linked together
Date: Wed, 28 Mar 2001 20:02:38 -0500

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. 

w. 

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

From: [EMAIL PROTECTED] (Dave Platt)
Subject: Re: wipeinfo, secure delete, device driver
Date: Thu, 29 Mar 2001 01:23:58 -0000

>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...

Valid point.  You'd probably need the factory-level servo-writing
diagnostics/hardware to be able to override the controller's block
mapping and get to the physical sectors... and even that might not be
possible on some drive designs.

I've been told that a really intensive data-recovery process
(typically involving the use of a SQUID probe, I gather) can often
recover valid data even from disk sectors which have been overwritten
several times with ones, zeroes, and random data.

For this reason, I believe that the military no longer considers
overwriting (of any sort, for any number of passes) to be adequate
security for hard drives which have held classified data and are being
declassified or scrapped.  The preferred method is a combination of
incineration (to raise the oxide layer to above its Curie temperature,
thus randomizing the magnetic domains) and industrial-strength
shredding of the whole hard drive.

What comes out of this process is small bits of scrap metal, not a
usable drive.

-- 
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!

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

From: "S. Miller" <[EMAIL PROTECTED]>
Subject: Re: Parallel Port
Date: Thu, 29 Mar 2001 02:22:05 GMT

Jan Pietrusky wrote:
> 
> Hello,
> how can I read and write values to or from the parallel port in user
> mode. If I'm root, I can use the write(), but read() failed. Why? I use
> /dev/port and I use open().
> 
> Thanks Jan
> --
>  ---------------------------------------------------------------------
> | Dipl.-Ing.(FH) Jan Pietrusky             | Tel: +49 (0) 3677 678331 |
> | Institut fuer Mikroelektronik- und       | FAX: +49 (0) 3677 678338 |
> | Mechatronik-Systeme                      |                          |
> | Langewiesener Strasse 22, 98693 Ilmenau  |                          |
> |---------------------------------------------------------------------|
> | MAIL/WWW: [EMAIL PROTECTED], http://www.imms.de/                |
>  ---------------------------------------------------------------------

Try using /dev/parport0 or as a last resort /dev/lp0.  These can be
opened to read ink levels from printers, so they should work for
anything else.

Steve
-- 
Madness takes its toll.  Please have exact change

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

Date: Wed, 28 Mar 2001 20:52:06 -0600
From: "Arthur H. Gold" <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps
Subject: Re: Ojbect files generated by GCC and G++ can not be linked together

[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: Carlos Moreno <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps
Subject: Re: Ojbect files generated by GCC and G++ can not be linked together
Date: Wed, 28 Mar 2001 22:52:21 -0500

"Arthur H. Gold" wrote:
> 
> 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

Well, not necessarily.  The compiler is free to use any 
internal name it likes, including _foo.  (but of course, 
this does not contradict your argument, since any trans-
formation that the compiler may do, will do it the same 
way for every function)

> 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).

As a side effect, naturally, you can not use function 
overloading with those, or default argument values -- but 
of course, that has to be ok:  if you're writing code in 
C, well, that code will not try to use function overloading, 
since the feature does not exist in C.

Carlos
--

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

From: "hushui" <[EMAIL PROTECTED]>
Subject: why it should be changed  to 36??
Date: Thu, 29 Mar 2001 13:27:11 +0800

In bootsect.S,
....
movb 4(di),*36  ! patch sector count
seg fs
mov (bx),di          ! di=#0x4000-12
seg fs
mov 2(bx),es           !es =INITSEG(0x9000)
..........

di=0x78h
0000:0078 is int 1Eh Interrupt Vector. The disk parament is set here. What
is the use of change it to 36 ???
I am really confused about it.




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

From: Madhava S Bhamy <[EMAIL PROTECTED]>
Subject: Re: I need a detailed documentation about TTY
Date: Thu, 29 Mar 2001 00:23:10 -0600

jbhuang wrote:

> First of all, thank you for your help.
>
> Can you tell me where to find a much detailed documentation about TTY  on
> line?
> I have checked www.linuxdoc.org, but I am still having troubles in tracing
> source codes,
> such as tty_io.c and tty_cntl.c
>
> I also need to know all the "flags" and data structure meaning, such as
> iflag, cflag, oflag...
>
> Thanks again.

source code for tty_io.c is at /usr/src/linux/drivers/char/

(http://guma.ii.fmph.uniba.sk/linux/usr/src/linux/drivers/char/tty_io.c.html)



tty_cntl.c? or tty_ioctl.c? tty_ioctl.c is also located in the same
directory.

Shenoy


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

From: [EMAIL PROTECTED] (InterFan)
Crossposted-To: comp.unix.programmer,comp.os.linux.development.apps
Subject: How to handle newline character(s) in a TCP server
Date: Thu, 29 Mar 2001 06:34:06 GMT
Reply-To: [EMAIL PROTECTED]


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

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

From: Ulrich Eckhardt <[EMAIL PROTECTED]>
Subject: Re: How to call a function and don't wait for return
Date: Thu, 29 Mar 2001 00:18:06 +0200

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

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

From: Madhava S Bhamy <[EMAIL PROTECTED]>
Subject: Re: Change in PPP handling from 2.4.0 to 2.4.1?
Date: Thu, 29 Mar 2001 00:32:43 -0600

Birger Toedtmann wrote:

> Hi,
>
> as there wasn't anything visible through search sites, I hope
> this is not a "don't bother us again"-question....
>
> I had PPP configured in my 2.4.0. It worked fine with a
> modem on /dev/ttyS0 and pppd-2.3.11.
>
> Now I switched to 2.4.1 (also tried 2.4.2, to no avail) and
> conquered a strange behaviour:
>
>  - /dev/ttyS0 works fine with pppd, modem is dialing,
>     connect is made
>
>  - pppd quits with ioctl(PPPIOCGFLAGS): invalid argument
>
> An ltrace of pppd when activated gives that this happens
> as ioctl is working the /dev/ppp device which returns -1,
> but I don't see which parameters do cause this.
>
> I am id=0, /dev/ttyS0 and /dev/ppp are 600. Any ideas?
>
> --
>   Birger T�dtmann
>   Handwerker f�r eletronische Netzwerke und deren Dienste
>   00 83 E2 57 EC 60 0B 1C  D3 18 AE 2A 40 55 81 22

Try using pppd-2.4.0.


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

From: Erik Max Francis <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps
Subject: Re: Ojbect files generated by GCC and G++ can not be linked together
Date: Wed, 28 Mar 2001 22:45:11 -0800

[EMAIL PROTECTED] wrote:

> 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?

In the C++ world you need to declare the C functions as being extern
"C".

-- 
 Erik Max Francis / [EMAIL PROTECTED] / http://www.alcyone.com/max/
 __ San Jose, CA, US / 37 20 N 121 53 W / ICQ16063900 / &tSftDotIotE
/  \ Only the ephemeral is of lasting value.
\__/ Ionesco
    Maths reference / http://www.alcyone.com/max/reference/maths/
 A mathematics reference.

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

From: Jimmy <[EMAIL PROTECTED]>
Subject: Question about ethertap device
Date: Thu, 29 Mar 2001 14:50:40 +0800

 Hi all,

    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?

    Thx a lot.

Jimmy




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


** 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