Sponsored Content
Top Forums UNIX for Advanced & Expert Users How the user process can access the character device loaded by my module Post 302561638 by Corona688 on Tuesday 4th of October 2011 04:52:48 PM
Old 10-04-2011
Code:
int val;
int fd=open("/dev/mydev", O_RDWR);
ioctl(fd, some_ioctl, &val);

If you need more detail than that, I'll need more detail from you. I don't even know what operating system you're on, let alone what your driver's doing...

Last edited by Corona688; 10-04-2011 at 06:00 PM..
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Can kernel process access user address space ?

Can kernel process access user address space ? (2 Replies)
Discussion started by: subhotech
2 Replies

2. UNIX for Dummies Questions & Answers

controll access to a device

Hello everyone, I write a program (Linux & Solaris) that will run as non-root user, but the program must have rw access to a device /dev/ipmi (on linux) or /dev/bmc (on solaris). What is the standard way of granting such access? Linux: chmod on /dev/ipmi ? suid root my program? Solaris:... (1 Reply)
Discussion started by: Pavel.Bures
1 Replies

3. Solaris

mcrypt module is not initially loaded with php

Hi I'm trying to do an upgrade for one application and whenever I run the upgradre the program shows the error that mcrypt module is not initially loaded with php. My server is running xampp 0.9 and I know this library of mcrypt is already installed. I changed the php.ini file in order to... (0 Replies)
Discussion started by: dahr
0 Replies

4. Homework & Coursework Questions

The pseudo-device provides a “backdoor” for gaining root access for a particular user.

Problem statement. In this part of the assignment, delegates will create a pseudo-device and write a device driver for it. The pseudo-device provides a “backdoor” for gaining root access for a particular user. Instead of compiling the device driver into the kernel, delegate will create a module.... (1 Reply)
Discussion started by: nyjilgeorge1
1 Replies

5. SCO

module loaded during the start up

hi Howto find out which driver (module) were loaded during the startup of SCO 5.0.6? (5 Replies)
Discussion started by: ccc
5 Replies

6. Fedora

Is Kernel module is the same as a device driver?

I have been reading prep questions for my second unix academy exam, and there's a nuance, I'm not sure I understand it correctly. I've been under impression from my readings of book by Evi Nemeth and from unix academy DVDs I've been watching, that kernel's modules are drivers. I think of it, as... (25 Replies)
Discussion started by: newlinuxuser1
25 Replies

7. UNIX for Advanced & Expert Users

AIX Dependent Module could not be loaded

I am encountering the above error , even after setting the environment variables correctly AFAIK. I've found sources that say LIBPATH is the shared library variable , and others that say LIB_PATH, so I set both: ========================= root@lipossrp01ga: # echo $gtm_dist ... (6 Replies)
Discussion started by: Clovis_Sangrail
6 Replies

8. UNIX for Advanced & Expert Users

Access a File as a Device?

I backed up my 320GB hard drive to a file with dd: dd if=/dev/sda of=dev_sda.17-Mar-2012 bs=1048576The main idea was to be able to be able to completely replace my hard drive from this backup if necessary, but I'd also like to be able to restore individual files. I realize I could use this dd... (20 Replies)
Discussion started by: Matt Miller
20 Replies

9. Linux

HTTPD process user to access NIS

Hi, I have a machine A with a web server apache2 running. By default, apache2 user is wwwrun. Problem is that this user is local. Instead, I would like apache2 user to be able to login via NIS server so it can access NFS resources of two NIS different groups, let's say group1..groupN... (2 Replies)
Discussion started by: asanchez
2 Replies

10. Shell Programming and Scripting

HTTP::DAV module errors - can't access URL

Hello, I am attempting to use the HTTP/DAV module in perl, and I have a script that transfers files to a website. However, I get the following error message: "Couldn't open https://www.thisismyurl.com/DAV: The URL "https://www.thisismyurl.com/DAV" is not DAV enabled or not accessible." ... (0 Replies)
Discussion started by: Scatterbrain26
0 Replies
PPI(4)							   BSD Kernel Interfaces Manual 						    PPI(4)

NAME
ppi -- user-space interface to ppbus parallel 'geek' port SYNOPSIS
device ppi Minor numbering: unit numbers correspond directly to ppbus numbers. #include <dev/ppbus/ppi.h> #include <dev/ppbus/ppbconf.h> DESCRIPTION
The ppi driver provides a convenient means for user applications to manipulate the state of the parallel port, enabling easy low-speed I/O operations without the security problems inherent with the use of the /dev/io interface. PROGRAMMING INTERFACE
All I/O on the ppi interface is performed using ioctl() calls. Each command takes a single uint8_t argument, transferring one byte of data. The following commands are available: PPIGDATA, PPISDATA Get and set the contents of the data register. PPIGSTATUS, PPISSTATUS Get and set the contents of the status register. PPIGCTRL, PPISCTRL Get and set the contents of the control register. The following defines correspond to bits in this register. Setting a bit in the control register drives the corresponding output low. STROBE AUTOFEED nINIT SELECTIN PCD PPIGEPP, PPISEPP Get and set the contents of the EPP control register. PPIGECR, PPISECR Get and set the contents of the ECP control register. PPIGFIFO, PPISFIFO Read and write the ECP FIFO (8-bit operations only). EXAMPLES
To present the value 0x5a to the data port, drive STROBE low and then high again, the following code fragment can be used: int fd; uint8_t val; val = 0x5a; ioctl(fd, PPISDATA, &val); ioctl(fd, PPIGCTRL, &val); val |= STROBE; ioctl(fd, PPISCTRL, &val); val &= ~STROBE; ioctl(fd, PPISCTRL, &val); BUGS
The inverse sense of signals is confusing. The ioctl() interface is slow, and there is no way (yet) to chain multiple operations together. The headers required for user applications are not installed as part of the standard system. BSD
January 2, 1998 BSD
All times are GMT -4. The time now is 05:24 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy