proc filesystem

Hello,

I have some code written in linux that uses proc filesytem to do some
configuartion on the device driver. I’m a beginner in this field and
currently studying resource manager. I’m trying to find information on how
to create entery in /proc and other related library. Can anybody point me
where I can get information on this? I have made a few scan on the
documentation of resource manager, in ddk, bsp source and I tried googling
on this and found no helpful info.

Your help is highly appreciated.

Thanks,
Hakim

Hakim <ddrv2002@yahoo.ca> wrote:

Hello,

I have some code written in linux that uses proc filesytem to do some
configuartion on the device driver. I’m a beginner in this field and
currently studying resource manager. I’m trying to find information on how
to create entery in /proc and other related library. Can anybody point me
where I can get information on this? I have made a few scan on the
documentation of resource manager, in ddk, bsp source and I tried googling
on this and found no helpful info.

Generally, QNX does not use the /proc filesystem for managing/configuring
drivers in the same way that Linux might.

If you told us what the code was trying to do – what configurations
it is trying to do, rather than how it does it under the Linux code,
we might be able to suggest how to do that under QNX.

-David

David Gibbs
QNX Training Services
dagibbs@qnx.com

We have linux driver for network serial port and I’m porting the code for
QNX6. The serial driver talks to the network device that has serial ports
and creates virtual serial port on the QNX host. The virtual serial driver
will be as exact as serial driver so that all application will work as if
they are using standard serial port. I understand that by using devctl the
information can be passed to the virtual serial driver. This will require a
whole new design, coding on configuration side which we want to avoid (which
was a few weeks of effort on the linux side).

From the resource manager documentation

"Command-line utilities can communicate with resource managers.
Since the API for communicating with a resource manager is the POSIX set of
functions, and since standard POSIX utilities use this API, the utilities
can be used for communicating with the resource managers.

For instance, the tiny TCP/IP protocol module contains resource-manager code
that registers the name /proc/ipstats. If you open this name and read from
it, the resource manager code responds with a body of text that describes
the statistics for IP.

The cat utility takes the name of a file and opens the file, reads from it,
and displays whatever it reads to standard output (typically the screen). As
a result, you can type:

cat /proc/ipstats"
I’m looking for this documentation, that is how ipstats entry is created and
the required related library to do this.

Thanks,
Hakim

“David Gibbs” <dagibbs@qnx.com> wrote in message
news:d1c60t$h0i$1@inn.qnx.com

Hakim <> ddrv2002@yahoo.ca> > wrote:
Hello,

I have some code written in linux that uses proc filesytem to do some
configuartion on the device driver. I’m a beginner in this field and
currently studying resource manager. I’m trying to find information on
how
to create entery in /proc and other related library. Can anybody point me
where I can get information on this? I have made a few scan on the
documentation of resource manager, in ddk, bsp source and I tried
googling
on this and found no helpful info.

Generally, QNX does not use the /proc filesystem for managing/configuring
drivers in the same way that Linux might.

If you told us what the code was trying to do – what configurations
it is trying to do, rather than how it does it under the Linux code,
we might be able to suggest how to do that under QNX.

-David

David Gibbs
QNX Training Services
dagibbs@qnx.com

Are ypu, by any chance, porting the linux driver for the Comtrol
DeviceMaster to QNX6? If so, good luck! :wink: Been there, done that…

It requires the use of the char-io DDK.

Geoff Roberts.



Hakim wrote:

We have linux driver for network serial port and I’m porting the code for
QNX6. The serial driver talks to the network device that has serial ports
and creates virtual serial port on the QNX host. The virtual serial driver
will be as exact as serial driver so that all application will work as if
they are using standard serial port. I understand that by using devctl the
information can be passed to the virtual serial driver. This will require a
whole new design, coding on configuration side which we want to avoid (which
was a few weeks of effort on the linux side).

From the resource manager documentation

"Command-line utilities can communicate with resource managers.
Since the API for communicating with a resource manager is the POSIX set of
functions, and since standard POSIX utilities use this API, the utilities
can be used for communicating with the resource managers.

For instance, the tiny TCP/IP protocol module contains resource-manager code
that registers the name /proc/ipstats. If you open this name and read from
it, the resource manager code responds with a body of text that describes
the statistics for IP.

The cat utility takes the name of a file and opens the file, reads from it,
and displays whatever it reads to standard output (typically the screen). As
a result, you can type:

cat /proc/ipstats"
I’m looking for this documentation, that is how ipstats entry is created and
the required related library to do this.

Thanks,
Hakim

“David Gibbs” <> dagibbs@qnx.com> > wrote in message
news:d1c60t$h0i$> 1@inn.qnx.com> …
Hakim <> ddrv2002@yahoo.ca> > wrote:
Hello,

I have some code written in linux that uses proc filesytem to do some
configuartion on the device driver. I’m a beginner in this field and
currently studying resource manager. I’m trying to find information on
how
to create entery in /proc and other related library. Can anybody point me
where I can get information on this? I have made a few scan on the
documentation of resource manager, in ddk, bsp source and I tried
googling
on this and found no helpful info.

Generally, QNX does not use the /proc filesystem for managing/configuring
drivers in the same way that Linux might.

If you told us what the code was trying to do – what configurations
it is trying to do, rather than how it does it under the Linux code,
we might be able to suggest how to do that under QNX.

-David

David Gibbs
QNX Training Services
dagibbs@qnx.com