AIX STREAMS driver question


 
Thread Tools Search this Thread
Operating Systems AIX AIX STREAMS driver question
# 1  
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
# 2  
Old 03-17-2011
I do not think so as streams will be able to filter messages but that is not what a firewall does. Apart from that - the only cases where I have seen streams still being used post AIX 4.3.3 had been on clusters running VCS on AIX - and even there it only reports cluster intercommunication problems.

If you need an AIX firewall you might want to have a look into ipsec

regards
zxmaus
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

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

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

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

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

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

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

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

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

9. 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
Login or Register to Ask a Question