Linux-Development-Sys Digest #601, Volume #8     Sat, 31 Mar 01 16:13:07 EST

Contents:
  Re: C-Programming, getchar(), console (Rene Herman)
  Re: Compaq NetFlex-3 Driver for Redhat Linux 5.2... (Trevor Hemsley)
  cpu speed (Tommy)
  Re: cpu speed (Frank Ranner)
  modprobe diagnostics during boot (Rick Ace)
  Re: cpu speed ("Igor Lautar")
  determining keycodes (John Prokopek)
  Re: opening ethernet as a raw device ([EMAIL PROTECTED])
  Re: opening ethernet as a raw device ([EMAIL PROTECTED])
  Re: determining keycodes ([EMAIL PROTECTED])
  Re: Question about ethertap device ([EMAIL PROTECTED])
  Re: opening ethernet as a raw device (Grant Edwards)
  Re: Processor ID (Norman Levin)
  Re: modprobe diagnostics during boot (=?iso-8859-1?Q?Andr=E9?= David)
  USB Cable Modem
  Re: Boot problem ("Karl Heyes")
  parse error with #include <linux/fs.h> ("Ian D. Stewart")

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

From: Rene Herman <[EMAIL PROTECTED]>
Subject: Re: C-Programming, getchar(), console
Date: Sat, 31 Mar 2001 06:50:59 +0200

Jakub Orb�n wrote:

> is there a function that reacts on a sigle key-press?

In addition tio the replies you received, also have a look at the very 
informative C-faq:

http://www.eskimo.com/~scs/C-faq/top.html

Cheers.

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

From: [EMAIL PROTECTED] (Trevor Hemsley)
Subject: Re: Compaq NetFlex-3 Driver for Redhat Linux 5.2...
Date: 31 Mar 2001 10:11:57 GMT

On Sat, 31 Mar 2001 02:17:36, "Christian G Jackson" 
<[EMAIL PROTECTED]> wrote:

> I can't find a Compaq NetFlex-3 NIC Driver for my Compaq 6000 5166 Tower PC
> and install won't let me continue.  Does anyone know where I can download
> this driver?

It's known as the tlan (ThunderLAN) driver and exists though whether 
it's in something as old as RH 5.2 is another matter.

If it isn't in your distribution then you can get source from 
http://tlan.kernel.dk

-- 
Trevor Hemsley, Brighton, UK.
[EMAIL PROTECTED]

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

From: Tommy <[EMAIL PROTECTED]>
Subject: cpu speed
Date: Sat, 31 Mar 2001 18:27:00 +0800

Dear all,

I would like to ask how can I get the cpu speed? Using uname, I can know a 
system is of what architecture, say i386 or sparc or whatever, but how can 
I get the MegaHertz it is running at?
-- 
Best Wishes,
Tommy

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

From: Frank Ranner <[EMAIL PROTECTED]>
Subject: Re: cpu speed
Date: Sat, 31 Mar 2001 21:58:03 +1000

Tommy wrote:
> 
> Dear all,
> 
> I would like to ask how can I get the cpu speed? Using uname, I can know a
> system is of what architecture, say i386 or sparc or whatever, but how can
> I get the MegaHertz it is running at?
> --
> Best Wishes,
> Tommy

Read file /proc/cpuinfo
Frank Ranner

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

From: Rick Ace <[EMAIL PROTECTED]>
Subject: modprobe diagnostics during boot
Date: Sat, 31 Mar 2001 08:08:53 -0500

I've built a new kernel from the sources and am now trying to boot it.
The new kernel is in place in /boot and a new entry was added to
/etc/lilo.conf.  The kernel boots OK but I run into trouble when
the rc.sysinit script calls modprobe.  Specifically, there are a
number of diagnostics of the form

  /lib/modules/2.2.17-14enterprise/usb/usbcore.o:
     unresolved symbol register_filesystem_Rsmpb5be2677

Hardware:  Dell PowerEdge 300, dual 800 MHz P-III
O/S: Red Hat 2.2.17-14

The three factory-installed kernels boot without problems;
only my new one has difficulty.

Any theories, explanations, or pointers to enlightening reading are
appreciated.  Thank you.

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

From: "Igor Lautar" <[EMAIL PROTECTED]>
Subject: Re: cpu speed
Date: Sat, 31 Mar 2001 16:09:25 +0200

Tommy <[EMAIL PROTECTED]> wrote in message
news:9a4bbp$2o1$[EMAIL PROTECTED]...
> Dear all,
>
> I would like to ask how can I get the cpu speed? Using uname, I can know a
> system is of what architecture, say i386 or sparc or whatever, but how can
> I get the MegaHertz it is running at?

# cat /proc/cpuinfo

You have lot's of info in /proc. look around a little. you'll find
information on your memory, pci, all of the procceses running etc.

Igor



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

From: John Prokopek <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.hardware,comp.os.linux.misc,comp.os.linux.setup
Subject: determining keycodes
Date: Sat, 31 Mar 2001 10:04:42 -0500

can someone tell me how to verify keycodes?
I am trying to map keys in a program by their keycodes and it doesn't
seem to be working.
I have tried using showkey but it doesn't seem to work. 
An example is the multiply key on the key pad. The keycode should 
be 0x37.  When I use showkey it just displays a '*' and does not return
a value.

any help would be greatly appreciated.

-- 
John D. Prokopek
[EMAIL PROTECTED]

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

From: [EMAIL PROTECTED]
Subject: Re: opening ethernet as a raw device
Date: Sat, 31 Mar 2001 15:35:19 -0000

On Thu, 29 Mar 2001 18:56:16 -0000 [EMAIL PROTECTED] wrote:
| In article <[EMAIL PROTECTED]>,
|  <[EMAIL PROTECTED]> wrote:
|
|>| Have you looked at the socket man page?
|
|>Yes.  But nothing along these lines is mentioned.
|
|        PF_PACKET          Low level packet interface       packet(7)

I'm looking for something lower.

-- 
=================================================================
| 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: Sat, 31 Mar 2001 15:42:06 -0000

On Thu, 29 Mar 2001 20:41:01 GMT Grant Edwards <[EMAIL PROTECTED]> wrote:

|>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.
|
| There's also the problem of other stuff in the kernel (ICMP
| handling, ARP handling, etc.)

I want to make sure for the particular device that none of this
is handled by the kernel.  I want my process to be exclusive on
the device.


| That's probably limited by the Ethernet drvier and hardware.
| I've never tried writing illegal frame lengths with a packet
| socket, but I wouldn't expect any particular Ethernet driver or
| chipset to support it.

I've heard of this kind of thing being done with dedicated (no OS)
software on at least some PC ethernet cards.  Whether the Linux
drivers can handle it or not could be an issue, but then, there is
the kernel source.  I just don't want to have to go so far as to
build up a whole new kind of device interface between process and
driver.


|>|>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.
|
| You can definitly use it to write any Ethernet packets you want
| (you can even set the src Ethernet address to whatever you want).

Can I set checksums that are invalid and send them that way?

Can I read the whole frame even if the checksum is invalid?


| In my applications, I configure it to only give me packets with
| a certain Ethernet protocol number -- that way I don't have to
| sort through packets I don't care about. You can set it to
| promiscuous mode and use a protocol number of 0 (IIRC) and then
| you get all packets.
|
| But, I think other kernel code still sees them too.

That I want to turn off.


| If you're implimenting something with a unique Ethernet
| protocol number, then nobody else will be listening for that
| type of packet anyway.

A small device a friend of building.  I just need a very high
speed path into the device.

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

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

From: [EMAIL PROTECTED]
Crossposted-To: comp.os.linux.hardware,comp.os.linux.misc,comp.os.linux.setup
Subject: Re: determining keycodes
Date: Sat, 31 Mar 2001 15:47:00 -0000

In comp.os.linux.development.system John Prokopek <[EMAIL PROTECTED]> wrote:

| can someone tell me how to verify keycodes?
| I am trying to map keys in a program by their keycodes and it doesn't
| seem to be working.
| I have tried using showkey but it doesn't seem to work. 
| An example is the multiply key on the key pad. The keycode should 
| be 0x37.  When I use showkey it just displays a '*' and does not return
| a value.

Your showkey is broken or doesn't match your kernel.

You should be getting something like:

=============================================================================
root@pollux:/root 48> showkey
kb mode was XLATE

press any key (program terminates 10s after last keypress)...
keycode  28 release
keycode  55 press
keycode  55 release
root@pollux:/root 49>
=============================================================================

And just to make sure, showkey is for virtual console, not X.

-- 
=================================================================
| 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: Sat, 31 Mar 2001 15:53:03 -0000

On Thu, 29 Mar 2001 18:34:43 +0800 Jimmy <[EMAIL PROTECTED]> wrote:

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

I think this is preventing you from forging one of the existing
interface addresses.  Think of the process that has ethertap open
as being the firmware running inside an ethernet switch.  What
goes to some port (and into Linux) should appear to come from
some OTHER machine on that subnet.


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

I think this program will need to change the source address to be one from
one of the addresses in the subnet/segment they tap0 interface is "attached"
to, such as 192.168.0.40.


| [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/     |
|> -----------------------------------------------------------------


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

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

From: [EMAIL PROTECTED] (Grant Edwards)
Subject: Re: opening ethernet as a raw device
Date: Sat, 31 Mar 2001 16:28:51 GMT

On Sat, 31 Mar 2001 15:35:19 -0000, [EMAIL PROTECTED] 
<[EMAIL PROTECTED]> wrote:

>|>| Have you looked at the socket man page?
>|
>|>Yes.  But nothing along these lines is mentioned.
>|
>|        PF_PACKET          Low level packet interface       packet(7)
>
>I'm looking for something lower.

I don't beleive there is anything lower level that raw packet
sockets.

-- 
Grant Edwards                   grante             Yow!  Sorry, wrong ZIP
                                  at               CODE!!
                               visi.com            

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

Date: Sat, 31 Mar 2001 08:06:23 -0600
From: Norman Levin <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
Crossposted-To: comp.os.linux.development.apps,comp.os.linux.hardware
Subject: Re: Processor ID

Kasper Dupont wrote:
> 
> [EMAIL PROTECTED] wrote:
> >
> > In article <[EMAIL PROTECTED]>,
 ** snipped **
this is much worry about nothing - when you have real things to worry about.
Whether a mac address is read once or with every packet makes no difference.
The fact is, YOU are identifiable.  The thought that CPUID is going to
be more of a tie to U vs your MAC address is rediculous.  All you need
to do is run winipcfg or ifconfig and ship that info down.  Sorry. this
cpuid is just a piece of *(& that lets people get worked up.
Get over it.

-- 
Norman Levin



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

From: =?iso-8859-1?Q?Andr=E9?= David <[EMAIL PROTECTED]>
Subject: Re: modprobe diagnostics during boot
Date: Sat, 31 Mar 2001 20:15:48 +0200

This is a multi-part message in MIME format.
==============8BE797A069E786CB404B6842
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Rick Ace wrote:

> I've built a new kernel from the sources and am now trying to boot it.
> The new kernel is in place in /boot and a new entry was added to
> /etc/lilo.conf.  The kernel boots OK but I run into trouble when
> the rc.sysinit script calls modprobe.  Specifically, there are a
> number of diagnostics of the form
>
>   /lib/modules/2.2.17-14enterprise/usb/usbcore.o:
>      unresolved symbol register_filesystem_Rsmpb5be2677
>
> Hardware:  Dell PowerEdge 300, dual 800 MHz P-III
> O/S: Red Hat 2.2.17-14
>
> The three factory-installed kernels boot without problems;
> only my new one has difficulty.
>
> Any theories, explanations, or pointers to enlightening reading are
> appreciated.  Thank you.

check the RH script

# less /sbin/installkernel

and  use

# linuxconf

to install and run lilo.



==============8BE797A069E786CB404B6842
Content-Type: text/x-vcard; charset=us-ascii;
 name="Andre.David.vcf"
Content-Transfer-Encoding: 7bit
Content-Description: Card for Andr� David
Content-Disposition: attachment;
 filename="Andre.David.vcf"

begin:vcard 
n:David;Andr�
tel;work:+41792013849
x-mozilla-html:FALSE
org:CERN;NA60
adr:;;;;;;
version:2.1
email;internet:[EMAIL PROTECTED]
x-mozilla-cpt:;2
fn:Andr� David
end:vcard

==============8BE797A069E786CB404B6842==


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

From: <[EMAIL PROTECTED]>
Subject: USB Cable Modem
Date: Sat, 31 Mar 2001 11:55:15 -0800

I'm working with a piece of prototype cable modem equipment that is
controlled via USB. I have gotten as far as tweaking plusb.c with the unique
vendor/product ID for this USB device and as the module loads when the USB
connector is attached, I can see messages from inside the probe function,
the net_init function an others. The problem is I am now trying to
communicate with it via the network stack to see what is happening with its
net_device open, close, start, stop routines. I try running netstat and it
is not much help. I try running ifconfig plusb0 (which is the name that
plusb gives it) and ifconfig is saying "No such device". Are there some
other utilities that I might be able to run that can determine what is
connected and what is not connected with the USB device? I'm looking for
various ways to query the USB driver via the network stack (or via the USB
stack, I don't care which) that can tell me what stage the driver has really
gotten to. I don't believe it is really initialized even thought the USB
driver says it is, I think I am being fooled by lack of knowledge of how it
is connected to the network stack.



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

From: "Karl Heyes" <[EMAIL PROTECTED]>
Subject: Re: Boot problem
Date: Sat, 31 Mar 2001 21:38:46 +0100

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


> I have recompiled my kernel and tried to make a LILO boot disk but I keep
> getting this message on boot.
> request_module[block-major-3] : Root fs not mounted VFS: Cannot open root
> device "hda7" or 03:07 Please append a correct "root=" boot option Kernel
> panic: VFS: Unabel to mount root fs on 03:07  The problem is I did append a
> correct "root=" option and both I and the new kernel know it!!  It is
> looking for 03:07 which is hda7 so what the heck!!  Is the problem in my
> boot disk, or my recompiled kernel?  Whats a newbie to do...  Thanks for any
> help anyone can offer.
> -Ted


Assuming /dev/hda7 is your root partition then two things could be wrong.

You don't have the code for the driver ie no ide driver in the kernel (check
/usr/src/linux/.config) or

you don't have the filesystem in the kernel.  (most likely ext2)

karl.

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

From: "Ian D. Stewart" <[EMAIL PROTECTED]>
Subject: parse error with #include <linux/fs.h>
Date: Sat, 31 Mar 2001 15:49:51 -0500

Howdy,

I'm working my way through the Linux Kernel Module Programmer's Guide,
and I've run into a hiccup in the section on character devices.  I get a
'parse error befor 'uid_t' in mount.h when building the following simple
test programming:

#include <linux/kernel.h>
#include <linux/module.h>

#ifdef CONFIG_MODVERSIONS
#include <linux/modversions.h>
#define MODVERSIONS
#endif

#include <linux/fs.h>

I'm compiling using the following command: 

        gcc -O2 -Wall -fno-strict-aliasing -DMODULE -D__KERNEL__ -DLINUX -c test.c

I'm running GCC 2.95.2 with Linux Kernel 2.4.3

If I remove the last line (#include <linux/fs.h>), every thing builds just fine.  
I'm sure it's something foolish that I'm doing, but haven't been able to 
figure out just what.  Any clues greatly appreciated.


Regards,
Ian

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


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