Linux-Development-Sys Digest #253, Volume #8 Thu, 2 Nov 00 21:13:11 EST
Contents:
Help on system call to get MAC address (Pjtg0707)
Accessing files from within a kernel module ("aldo.gavioli")
Linux GUI development ([EMAIL PROTECTED])
Linux in assembly ([EMAIL PROTECTED])
Re: How to control parallel port from user level? ("Christoph")
Re: Linux in assembly (Alexander Viro)
Re: Linux GUI development ("Tristan Wibberley")
Re: Linux in assembly (Kaz Kylheku)
Re: Why does this stuff no work ? (Peter Pointner)
Some samples on creating device drivers ("Vladimir Libershteyn")
Re: Linux in assembly (Tux)
Re: Some samples on creating device drivers (Tux)
Re: Why does this stuff no work ? (David Weis)
Drivers for Logitech Quickcam Express ("Rafael Funke")
starting netscape ("Christos Karayiannis")
mounting RAMFS as / ([EMAIL PROTECTED])
Re: Accessing files from within a kernel module ("Karl Heyes")
System call socketcall - recv() called by Linux continuously ?!? (Rui Antunes)
Re: System call socketcall - recv() called by Linux continuously ?!? (Kaz Kylheku)
Re: Supplying buffers to a device driver (Jeff Andre)
----------------------------------------------------------------------------
From: [EMAIL PROTECTED] (Pjtg0707)
Subject: Help on system call to get MAC address
Date: Thu, 02 Nov 2000 16:41:58 -0000
Reply-To: [EMAIL PROTECTED]
Hi,
I am trying to write an app that will get the
ethernet MAC addresses for all the machines
attached to a LAN, and I am wondering if
there is a system call that will do it.
I looked in Stevens' book on Network
Programming, and I found some calss on sockets
to get
IP addresses, but not MAC addresses.
I know it can be done because ifconfig fetches
the MAC address of the ethernet cards.
------------------------------
From: "aldo.gavioli" <[EMAIL PROTECTED]>
Subject: Accessing files from within a kernel module
Date: Thu, 2 Nov 2000 17:46:26 +0100
I need to read a file from within a kernel module (a pseudo block device
driver).
The file is a simple ASCII in /opt, I couldn't figure out a metode to open
and read from it.
I'm trying to open with filp_open() and then read using the read pointed by
the file->dentry->inode->file operation structure i get, but the open()
fails with error code -14
May it is because I allocate the buffer in kernel space, while I should pass
a userspace pointer?
I'd really appreciate any hints, thanks.
------------------------------
From: [EMAIL PROTECTED]
Subject: Linux GUI development
Date: Thu, 02 Nov 2000 16:42:28 GMT
When technology is taken a look at from a broad viewpoint
and from a historical perspective, there are patterns
that must be recognized as having survival characteristics.
The following rule govern technology...
All technology must make tasks more simple either by
less effort or less time.
Effort can be physical work or mental work by any human.
What is happening today is that the interface between the human
and the machine is becoming more and more important. It
will become the sole dictator of surviving technologies.
Lets take an example: the automobile became faster and faster
and simpler and simpler to drive. Soon, it should drive it self
and do it in very short time.
Likewise, the computer can be compared to technologies in other
areas of different industries. The most important interface
between the User and the Computer is the Keyboard and the
Graphical User Interface (GUI). The keyboard has been through
many evolutions and have settled on QWERTY layout for latin
characters. There is not much that can be changed there except
addition of more buttons. However, there is a tradeoff in
adding more keys. On the one hand it may simplify work
by autolaunching some programs or making the "start" button
pop up its menu. However, the more buttons you add, the more
the user has to search for the keys and memorize its location
on the keyboard. Adding too MANY keys (physical) ends up making
more work for the user, thus is not an advance in technology.
A different technology derived from the military is the
mouse (and joystick). These allow previously difficult
navigation using the keyboard to easily navigation via
the mouse and clicking icons. This created less work and
thus survived in its current incarnation.
What is stopping the LINUX from mass adoption is the requirement
for complex work on the human to set it up, and the sometimes
troublesome sequences required for adding and deleting applications.
Plug and Play provided a technological advance for the cumbersome
IRQ switches (although I would say it is hardly perfec).
Microsoft Word added templates for formal letters and does spell
checking and grammar proofreading. All these are there to create
less work for the human.
In order for Linux to be adopted, it must start being simpler to
use, install, and such. No major adoption can be made if
the average joe at the retail store does not know how to
use the command line.
Gnone and KDE are on the forfront of the linux gui development.
Red hat is coming up with more user friendly installations.
But the critical factor that has to come is for the GUI
to become more and more simpler and do more and more work for
the human.
A lot of diehard unix/linux users insists it is great and
a shell is indication of knowledge and power. This may be true,
but the majority of the people in the world do not have time
nor the interest in learning complex and archaic commands
just to do simple stuff. This is why Microsoft is succeding
right now, because they are becoming more and more userfriendly.
Apple had a lock on the initial userfriendliness but was somehow
knocked off of its pedastal. They are slowly coming back.
What needs to happen in the linux internet space is to initiate
different GUI incarnations and the development of them in internet
time. An explosion of applications and GUI interface needs to
happen so that a true winner will come out and it should usually
be the most user friendly. The current menu and icon structure
is pretty easy, but there are easier ones that can be made.
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
From: [EMAIL PROTECTED]
Subject: Linux in assembly
Date: Thu, 02 Nov 2000 16:47:46 GMT
could it be possible to move some of the linux kernel c stuff into
assembly ported and fine tuned to each processor so that it
is fast and efficient? There are technology in this area
using machine language modules that can be loaded and swapped in
so that they could be developed in a modular way (like how
software components like classes in C++ and java work). I believe
something along the lines of V2_OS but retain the multitasking
and other virtual memory stuff.
This would speed up the core cycles.
Of course, the other direction that the industry is also following
is to wait for the microprocessor to catch up to speed. Like
java, or create a microprocessor that can run native cross cpu
programs natively (like picojava chips).
Sent via Deja.com http://www.deja.com/
Before you buy.
------------------------------
From: "Christoph" <[EMAIL PROTECTED]>
Subject: Re: How to control parallel port from user level?
Date: Thu, 2 Nov 2000 18:13:57 +0100
"Kasper Dupont" <[EMAIL PROTECTED]> schrieb im Newsbeitrag
news:[EMAIL PROTECTED]...
> > I want to control the parallel port from user level. Unfortunately I
can't
> > find ioperm which should be in unistd.h on i386 systems. Where is it?
[...]
> #include <unistd.h> /* for libc5 */
> #include <sys/io.h> /* for glibc */
[...]
Yes, now it works. Thank you!
------------------------------
From: [EMAIL PROTECTED] (Alexander Viro)
Subject: Re: Linux in assembly
Date: 2 Nov 2000 12:28:31 -0500
In article <8ts5rf$av1$[EMAIL PROTECTED]>, <[EMAIL PROTECTED]> wrote:
>
>
>could it be possible to move some of the linux kernel c stuff into
>assembly ported and fine tuned to each processor so that it
>is fast and efficient?
Yes. It's called "C compiler".
--
"You're one of those condescending Unix computer users!"
"Here's a nickel, kid. Get yourself a better computer" - Dilbert.
------------------------------
From: "Tristan Wibberley" <[EMAIL PROTECTED]>
Subject: Re: Linux GUI development
Date: Thu, 2 Nov 2000 18:03:53 -0000
[EMAIL PROTECTED] wrote in message <8ts5hi$aor$[EMAIL PROTECTED]>...
>A lot of diehard unix/linux users insists it is great and
>a shell is indication of knowledge and power. This may be true,
>but the majority of the people in the world do not have time
>nor the interest in learning complex and archaic commands
>just to do simple stuff.
Not suprisingly, a lot of diehard unix/linux users couldn't give a flying
fsck for the majority of people. If they want a MS Windows clone that they
don't have to pay for, they can go ahead and write one. Linux is a
UNIX-a-like -- if you change it, it's not Linux anymore, so by definition;
Linux *cannot* be the OS that you desire - you'll have to find another one.
>What needs to happen in the linux internet space is to initiate
>different GUI incarnations and the development of them in internet
>time. An explosion of applications and GUI interface needs to
>happen so that a true winner will come out and it should usually
>be the most user friendly. The current menu and icon structure
>is pretty easy, but there are easier ones that can be made.
That doesn't need to happen at all. If Linux changed how you want it to, the
people who've made it what it is will abandon it and create a new OS to meet
their needs which will rise above the new shite user-Linux - then people
like you will demand that Linux (like Microsoft Windows) should die, and the
new Uber-OS be made shit in the same manner. It won't work, stop wasting
Linux hackers' time.
Windows is Windows, for the masses. Linux is Linux, for smarter people. You
can't be all things to all people - Let the masses use Windows, and keep
Linux better than Windows.
--
Tristan Wibberley
------------------------------
From: [EMAIL PROTECTED] (Kaz Kylheku)
Subject: Re: Linux in assembly
Reply-To: [EMAIL PROTECTED]
Date: Thu, 02 Nov 2000 17:51:27 GMT
On Thu, 02 Nov 2000 16:47:46 GMT, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
>
>could it be possible to move some of the linux kernel c stuff into
>assembly ported and fine tuned to each processor so that it
>is fast and efficient?
This has already been done to a large extent. There is inline assembly language
used in the kernel where it is appropriate.
> There are technology in this area
>using machine language modules that can be loaded and swapped in
>so that they could be developed in a modular way (like how
>software components like classes in C++ and java work). I believe
The technology for churning out object oriented machine language is
called a higher level language.
>This would speed up the core cycles.
Could you back this up with some concrete profiling data, or are you just
guessing? What functions do you want to rewrite in assembly language?
------------------------------
From: Peter Pointner <[EMAIL PROTECTED]>
Subject: Re: Why does this stuff no work ?
Date: 2 Nov 2000 07:02:29 +0100
David Weis <[EMAIL PROTECTED]> wrote:
> because sr0 is a readonly device.
Not generally true. A SCSI DVD-RAM drive shows up as sr0, and you
can write to it (kernel 2.2.16).
Peter
------------------------------
From: "Vladimir Libershteyn" <[EMAIL PROTECTED]>
Subject: Some samples on creating device drivers
Date: Thu, 2 Nov 2000 10:51:19 -0800
Hello,
I'm relatively new in a Linux world.
Recently, I've been porting some Tru64 drivers to Linux. I made it work, but
I'd prefer to look at some samples for existing drivers.
Could you, please point me to some sites that might have this information?
Regards,
Vladimir
------------------------------
From: Tux <[EMAIL PROTECTED]>
Subject: Re: Linux in assembly
Date: Thu, 02 Nov 2000 20:01:36 +0100
Hi!
> could it be possible to move some of the linux kernel c stuff into
> assembly ported and fine tuned to each processor so that it
> is fast and efficient?
Have a look at the kernel c stuff. Most of the basic functions are
written in assembler or inline-assembler. And I think they ARE
fine-tuned whenever it is possible. If not, you could try it.
But the more you use different processor-specific assembler routines,
the more you have to develope these different routines. Would it be
worth the work?
> This would speed up the core cycles.
Have you tried?
Tux
------------------------------
From: Tux <[EMAIL PROTECTED]>
Subject: Re: Some samples on creating device drivers
Date: Thu, 02 Nov 2000 20:03:48 +0100
Hi,
what about having a look at the kernel sources? There are many existing
drivers.
Tux
------------------------------
From: David Weis <[EMAIL PROTECTED]>
Subject: Re: Why does this stuff no work ?
Date: Thu, 2 Nov 2000 13:30:22 -0600
On 2 Nov 2000, Peter Pointner wrote:
> David Weis <[EMAIL PROTECTED]> wrote:
>
> > because sr0 is a readonly device.
>
> Not generally true. A SCSI DVD-RAM drive shows up as sr0, and you
> can write to it (kernel 2.2.16).
True, but in terms of the sg interface, it's not the same thing.
dave
--
David Weis | 10520 New York Ave, Des Moines, IA 50322
[EMAIL PROTECTED] | Voice 515-278-0133 Ext 231
| http://www.perfectionlearning.com/
When they took the Fourth Amendment, I was quiet because I didn't deal drugs.
When they took the Fifth Amendment, I was quiet because I was innocent.
When they took the Second Amendment, I was quiet because I didn't own a gun.
Now they've taken the First Amendment and I can't say anything.
------------------------------
From: "Rafael Funke" <[EMAIL PROTECTED]>
Subject: Drivers for Logitech Quickcam Express
Date: Thu, 2 Nov 2000 21:11:11 +0100
Hello,
are there any drivers (and programs) for the Logitech Quickcam Express (USB) ?
I'm searching for a program, which produces .jpg files from the webcam data.
------------------------------
From: "Christos Karayiannis" <[EMAIL PROTECTED]>
Subject: starting netscape
Date: Thu, 2 Nov 2000 23:12:30 +0200
I am trying to use Netscape Communicator and the resolution of the images is
very low. The errors I get refer to the -visual parameter of netscape with
the GrayScale and some other categories of color. But using that the problem
slightly change. Also the minimaze and close buttons of the windows in my X
window enviroment rarely work. Could I have some recommentation please?
------------------------------
From: [EMAIL PROTECTED]
Subject: mounting RAMFS as /
Date: Thu, 02 Nov 2000 21:33:48 -0000
I would like to mount RAMFS (CONFIG_RAMFS) as / (not RAMDISK). I can
populate RAMFS from within /linuxrc (which would be started from INITRD).
But the problem is, how do I tell the kernel that the root device is
RAMFS when there is no major/minor (apparently) associated with it?
What would I write into /proc/sys/kernel/real-root-dev to do this?
--
| Phil Howard - KA9WGN | My current websites: linuxhomepage.com, ham.org
| phil (at) ipal.net +----------------------------------------------------
| Dallas - Texas - USA | [EMAIL PROTECTED]
------------------------------
From: "Karl Heyes" <[EMAIL PROTECTED]>
Subject: Re: Accessing files from within a kernel module
Date: Thu, 02 Nov 2000 23:28:28 +0000
In article <8ts5k9$lip$[EMAIL PROTECTED]>, "aldo.gavioli"
<[EMAIL PROTECTED]> wrote:
> I need to read a file from within a kernel module (a pseudo block device
> driver). The file is a simple ASCII in /opt, I couldn't figure out a metode
> to open and read from it. I'm trying to open with filp_open() and then read
> using the read pointed by the file->dentry->inode->file operation structure i
> get, but the open() fails with error code -14 May it is because I allocate
> the buffer in kernel space, while I should pass a userspace pointer?
> I'd really appreciate any hints, thanks.
>
use the sys_open sys_read functions etc.
karl.
------------------------------
From: [EMAIL PROTECTED] (Rui Antunes)
Crossposted-To: alt.os.linux,comp.os.linux.help,comp.os.linux.questions
Subject: System call socketcall - recv() called by Linux continuously ?!?
Date: Thu, 02 Nov 2000 18:39:30 GMT
I'm developping a module that intercepts the socket API. It's
working fine, except for one little detail - the module is detecting
that the int recv(int sockfd,...) is being called continuosly
(the module sends a message to the console using printk indicating
it); it seems like Linux is always trying to check for some incoming
packet on some socket (with sockfd == 0 !!!!) with a O_NONBLOCK
work-alike flag (and the sys call keeps on returnin 0 bytes
received...) - is it possible?
None of this happens with other functions (like
int send(int sockfd, ...), int connect(int sockfd, ...), etc...); I'm
almost sure that it isn't a bug from my module (like in other
intercepting functions, in recv(), the module just calls the original
recv() call and returns its result)!
Any help would be appreciated... Thanks
Rui Antunes
[EMAIL PROTECTED]
------------------------------
From: [EMAIL PROTECTED] (Kaz Kylheku)
Crossposted-To: alt.os.linux,comp.os.linux.help,comp.os.linux.questions
Subject: Re: System call socketcall - recv() called by Linux continuously ?!?
Reply-To: [EMAIL PROTECTED]
Date: Fri, 03 Nov 2000 00:34:58 GMT
On Thu, 02 Nov 2000 18:39:30 GMT, Rui Antunes <[EMAIL PROTECTED]> wrote:
> I'm developping a module that intercepts the socket API. It's
>working fine, except for one little detail - the module is detecting
>that the int recv(int sockfd,...) is being called continuosly
>(the module sends a message to the console using printk indicating
>it); it seems like Linux is always trying to check for some incoming
>packet on some socket (with sockfd == 0 !!!!) with a O_NONBLOCK
>work-alike flag (and the sys call keeps on returnin 0 bytes
>received...) - is it possible?
Why don't you print the current->pid? That way you can see which process
is doing it.
------------------------------
From: [EMAIL PROTECTED] (Jeff Andre)
Subject: Re: Supplying buffers to a device driver
Date: 3 Nov 2000 00:53:02 GMT
Pete Zaitcev ([EMAIL PROTECTED]) wrote:
: >[...]
: > What I'd like to do is supply a channel with a number of buffers.
: > When a buffer becomes full, set the card to use the next buffer and
: > tell the application that the first buffer is full. The card has a
: > scatter/gather capabilities so the card can write directly into the
: > user space (after the buffers have been prepared with the kiobuf
: > facility). Use this eliminates double buffering.
: First a minor nitpicking - I used to think that "double buffering"
: is exactly the name of the technique that you describe in the
: begining of the paragraph. It has no relation to the number of
: times data are copied.
What is double buffering then? I've used that term for years in
that context.
: Secondly, look at the way bttv operates. It allocates a kernel
: buffer (segmented with frames), then allows user to remap it with
: mmap(). The VIDIOCSYNC blocks a user thread until a frame arrives,
: syncs caches, and returns to the user. The rest is obvious...
: This technique also eliminates copying, unless you need more
: frames in flight than were allocated initially.
: The bttv does not send you any signals. You have to have a thread
: that blocks at VIDIOCSYNC. Once it's back from the ioctl it can
: signal to someone else. Normally it is not a problem as
: scalability of your hardware will kill you before the scalability
: of multithreading.
Interesting. Looking at the code I could try having multiple
threads, one for each channel and have them hang on an ioctl().
: Using kiobufs racks you hacker points but they are a strictly 2.4
: feature.
Since this is a turnkey system I can use a modified kernel. I
installed the raw I/O patch for 2.2.x. (kiobuf is part of it) It
was less hacking than nailing the user pages in memory, getting
their real address, making sure the pages are always cleaned-up, ...
Thanks for the reference.
Jeff
------------------------------
** 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
******************************