Sponsored Content
Full Discussion: AIX STREAMS driver question
Operating Systems AIX AIX STREAMS driver question Post 302504990 by rocktilldie on Tuesday 15th of March 2011 11:32:03 PM
Old 03-16-2011
AIX STREAMS driver question

Hi all,

I have a AIX kernel STREAMS question need your help,
I need to implement a firewall on AIX and get packet raw data then decide pass or drop it,
I've seen similiar firewall code on HP-UX,
on HP-UX, you have to implement a "dlpi STREAMS driver", and specify it as a "dlpi" driver in metadata,
then you can get the packet in your STREAMS driver's read and write callback function just like below sample driver.

I found following sample code in IBM site,

Code:
#include <errno.h>
#include <sys/stream.h>
static int passclose(), passopen
(), passrput(), passwput();
static struct module_info minfo = { 0, "pass", 0, INFPSZ, 2048, 128 };
static struct qinit rinit = { passrput, 0, passopen, passclose, 0, &minfo };
static struct qinit winit = { passwput, 0, 0, 0, 0, &minfo };
struct streamtab passinfo = { &rinit, &winit };
static int
passclose (queue_t *q)
{
return 0;
}
static int
passopen (queue_t *q, dev_t *devp, int flag, int sflag, cred_t *credp)
{
return 0;
}
static int
passrput (queue_t *q, mblk_t *mp)
{
putnext(q, mp);
return 0;
}
static int
passwput (queue_t *q, mblk_t *mp)
{
putnext(q, mp);
return 0;
}

But I have two question
(1) I don't know how to register this sample driver as a dlpi driver on AIX,
Do I have to specify something in struct module_info? But seems there's no module_info declaration on website, where can I get it?
or do I need specify something when call strload?

(2) Writing a dlpi STREAS driver to hook network packet on AIX is a feasible way as a firewall?

Thanks a lot for your information.

Ryan

Last edited by pludi; 03-16-2011 at 05:00 AM.. Reason: code tags, please
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

NIC driver building question

I'm way confused. I loaded RH 7.1 on an old P-75 Compaq. IT has an EtherExpress pro/100 card in it and I have that attached to the optional port on our firewall with a crossover....I can't seem to get the card to negotiate with the firewall...it's currently 100Meg at Half duplex. I'm at a loss... (3 Replies)
Discussion started by: kwalter
3 Replies

2. Solaris

SUNWglmr -- rasctrl environment monitoring driver for i2c or SCSI device driver ?

I've been researching minimizeing Solaris 8 and found that on the web page http://www.sun.com/bigadmin/content/packagelist/s8u7PkgList/p2.html the package SUNWglmr is listed as "rasctrl environment monitoring driver for i2c, (Root) (32-bit)" while in the document "Solaris 8 minimize-updt1.pdf"... (1 Reply)
Discussion started by: roygoodwin
1 Replies

3. OS X (Apple)

open-source driver question

Hi, I'm a linux guy and have used netbsd, openbsd, freebsd etc in the past but never tangled with the kernel or drivers outside of Linux. My mother has fried her ethernet port on her iMac (G4 I think); I recently sent her a silicom USB U2E (usb 2 ethernet) dongle which is evidently not... (2 Replies)
Discussion started by: sjalex
2 Replies

4. AIX

Need EMC Symmetrix driver for AIX 5.3

Hi all, I hope I'm putting my first post at this site into the right forum. I need help finding the EMC disk driver for AIX version 5.3. I have some new EMC disk presented to a backup server of mine, and right now the EMC hdisks show up looking like this in an lsdev: hdisk495 Available... (2 Replies)
Discussion started by: C.J.Hund
2 Replies

5. AIX

Uninstall native MPIO driver on AIX

Hi, I was trying to uninstall the native MPIO driver on the AIX 6.1 machine we have in our lab and ran into a whole bunch dependent filesets initially. I deleted the disks, fcsX, fscsiX, fcnetX and tried again, but ran into the same error. Subsequently, I figured out that the OS disks in... (4 Replies)
Discussion started by: ronykris
4 Replies

6. AIX

how to know if my aix have multi-path driver installed?

I have an aix server, it is not a VIO server or client. I need to check if it has multi-path driver installed, how to check it? (1 Reply)
Discussion started by: rainbow_bean
1 Replies

7. UNIX for Dummies Questions & Answers

boot option Available partitions 0b00 1048575 sr0 driver:sr 0800 488386584 sda driver:sd

Help, suspect hacked via serial or electric! any ideas on error "Pid:1, comm:swapper Tainted:G W 2.6.35-22 generic #33 -unbutu device = "(null)" or unknown-blocklist(8.1) please append a correct "root"boot option Available partitions 0b00 1048575 sr0 driver:sr 0800 488386584 sda driver:sd. Thanks... (3 Replies)
Discussion started by: kryclear
3 Replies

8. Hardware

Difference between platform driver,codec driver and Machine driver

In general terms what are the differences platform driver,codec driver and Machine driver? (1 Reply)
Discussion started by: rupeshkp728
1 Replies

9. BSD

A question about BSD kernel and driver

I have an old hppa workstation install Openbsd on it,suppose i want to use bktr driver on it,i see bktr is configured on some archs(amd64,i386,ppc) but not on hppa,can i use the bktr driver line from amd64 or i386 in Generic kernel or custom kernel config? (3 Replies)
Discussion started by: Linusolaradm1
3 Replies
STREAMS(4)						 BSD/i386 Kernel Interfaces Manual						STREAMS(4)

NAME
streams -- System V STREAMS networking ABI support SYNOPSIS
To compile support for this ABI into the kernel, place the following line in your kernel configuration file: device streams Alternatively, to load the ABI as a module at boot time, place the following line in loader.conf(5): streams_load="YES" DESCRIPTION
The streams module provides limited System V Release 4 STREAMS interprocess communication ABI (application binary interface) compatibility for userland applications. Internally, streams provides STREAMS handles by using socket creation kernel routines, and adding state-tracking information to the socket to permit manipulation by STREAMS emulation code in svr4(4). Hence, opening a stream device produces a result similar to what would be obtained by calling socket(2). Applications should never use this interface directly: STREAMS emulation is only provided as a service to support ABI requirements in the SVR4 environment which svr4(4) needs to present to client binaries. SEE ALSO
svr4(4) HISTORY
System V Release 4 ABI support first appeared in FreeBSD 4.0. The ABI was ported from an equivalent facility present in NetBSD 1.3 written by Christos Zoulas. BUGS
This whole interface is a crude hack to produce STREAMS semantics through emulation over sockets. Programmers who hope to be able to use this interface to provide SVR4 STREAMS services to BSD applications will be sorely disappointed. BSD
March 17, 2008 BSD
All times are GMT -4. The time now is 08:00 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy