Sponsored Content
Top Forums UNIX for Advanced & Expert Users Transparent ioctls Streams calls Post 22301 by S.P.Prasad on Friday 31st of May 2002 12:49:05 AM
Old 05-31-2002
Transparent Ioctls in Streams

Thanks a ton for your reply. What I understood that the u area is outside the scope of Stream's module except to its open and close modules.

By stating "The related data is sent in message pairs exchanged between the Stream head and the module. A pair of messages is required so that each transfer can be acknowledged." - did you mean to say that :
*mblk_t->b_cont->b_rptr == *mblk_t->b_rptr ie data buffer content is same(2 Copies of data is there ) or
mblk_t->b_cont = dupb ( mblk_t )
ie mblk_t->b_datap == mblk_t->b_cont->b_datab . Kindly clarify. While transferring data from kernel space to user or vice versa the first message block is responsible for populating the ioctl's request's response as M_COPYIN or M_COPYOUT (mblk_t->b_datap->db_type member = M_COPYIN or M_COPYOUT)
Sir, does it then means that cq_addr and cq_size of copyreq structure identifies the data and its size in the user space.
Sir , kindly also guide me on the fact that if the command type is I_STR for an input / output operation on a Stream - is it that, at the timeout interval specified in ic_timout member of strioctl structure, the stream device itself responds with ETIME error . The Stream knows how to process the internal ioctl command type and loops the message block into the queue of itself.

Last edited by S.P.Prasad; 06-06-2002 at 06:41 AM..
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to make my xterm transparent

I just want to make my xterm to be transparent, but I don't know how, could somebody tell me? :( (3 Replies)
Discussion started by: zhiyuan
3 Replies

2. Cybersecurity

IPNAT / Transparent proxy loops...

Hi! My situation: I have an OpenBSD firewall/proxy (192.168.0.1), running IPF/IPNAT w/ Squid as transparent proxy. This machine is configured to be gateway to the network. This works great, all the clients WWW-requests on the internal network are rerouted to the proxyport by this... (0 Replies)
Discussion started by: indo1144
0 Replies

3. IP Networking

Identification of data calls & voice calls

Is there any facility to filter/identify the data calls and voice calls coming throug modem? OR Can we get the data or voice calls information through a script(preferably C Kermit)? (0 Replies)
Discussion started by: pcsaji
0 Replies

4. IP Networking

SQUID Transparent Proxy Server

hi guys! We are setting up Squid Server. we want the server to be transparent. But I don't know how will i be able to set the network up. is it possible to set the squid server in the same LAN with the Squid Client and still functions as a transparent server? if so, can anybody help me do it? ... (1 Reply)
Discussion started by: init6_
1 Replies

5. Virtualization and Cloud Computing

Invisible/Transparent Background in VM

Hello, If you switch to "seamless mode" in virtualbox, you can see the taskbar of the OS on your screen , like having a transparent background on your VM. My question: is there a possibility to do the same in VMware's Workstation (7) ? I know and use the "Unity" mode in Workstation/Player, but... (0 Replies)
Discussion started by: al0x
0 Replies

6. UNIX for Dummies Questions & Answers

Transparent compression and encryption

in windows you can encrypt and compress file via it properties. It compress the file in a way that is transparent, I mean you do know that it is compressed, but you can work with it as if it is not, you don't need to decompress it in order to edit it or watch it. The same go for encryption as... (0 Replies)
Discussion started by: programAngel
0 Replies

7. Ubuntu

Vlc transparent

I'm I able to make vlc or mplayer transparent. If so how can i do it please. thanks in advance josh (0 Replies)
Discussion started by: jtsmith90
0 Replies

8. IP Networking

Transparent Proxy with URL Rewriting

All traffic on the LAN is routed through a single machine and filtered using iptables. I'd like to redirect this traffic to a transparent proxy running on the same machine that will rewrite the URL if it matches a specified regex, in which case the user will be redirected to a local server. In... (0 Replies)
Discussion started by: crottyan
0 Replies

9. OS X (Apple)

OSX Sierra transparent shell audio sampler.

Well after the transparent QuickTime Player means of capture for OSX 10.7.x became broken in at least Yosemite I decided to persevere with a version of command line capture for OSX 10.12.x. A derivative of this DEMO is now inside AudioScope.sh to give my MBP and iMac a means of capturing an... (3 Replies)
Discussion started by: wisecracker
3 Replies
IPNAT(4)						     Kernel Interfaces Manual							  IPNAT(4)

NAME
ipnat - Network Address Translation kernel interface SYNOPSIS
#include <netinet/ip_compat.h> #include <netinet/ip_fil.h> #include <netinet/ip_proxy.h> #include <netinet/ip_nat.h> IOCTLS
To add and delete rules to the NAT list, two 'basic' ioctls are provided for use. The ioctl's are called as: ioctl(fd, SIOCADNAT, struct ipnat **) ioctl(fd, SIOCRMNAT, struct ipnat **) ioctl(fd, SIOCGNATS, struct natstat **) ioctl(fd, SIOCGNATL, struct natlookup **) Unlike ipf(4), there is only a single list supported by the kernel NAT interface. An inactive list which can be swapped to is not cur- rently supported. These ioctl's are implemented as being routing ioctls and thus the same rules for the various routing ioctls and the file descriptor are employed, mainly being that the fd must be that of the device associated with the module (i.e., /dev/ipl). The structure used with the NAT interface is described below: typedef struct ipnat { struct ipnat *in_next; void *in_ifp; u_short in_flags; u_short in_pnext; u_short in_port[2]; struct in_addr in_in[2]; struct in_addr in_out[2]; struct in_addr in_nextip; int in_space; int in_redir; /* 0 if it's a mapping, 1 if it's a hard redir */ char in_ifname[IFNAMSIZ]; } ipnat_t; #define in_pmin in_port[0] /* Also holds static redir port */ #define in_pmax in_port[1] #define in_nip in_nextip.s_addr #define in_inip in_in[0].s_addr #define in_inmsk in_in[1].s_addr #define in_outip in_out[0].s_addr #define in_outmsk in_out[1].s_addr Recognised values for in_redir: #define NAT_MAP 0 #define NAT_REDIRECT 1 NAT statistics Statistics on the number of packets mapped, going in and out are kept, the number of times a new entry is added and deleted (through expiration) to the NAT table and the current usage level of the NAT table. Pointers to the NAT table inside the kernel, as well as to the top of the internal NAT lists constructed with the SIOCADNAT ioctls. The table itself is a hash table of size NAT_SIZE (default size is 367). To retrieve the statistics, the SIOCGNATS ioctl must be used, with the appropriate structure passed by reference, as follows: ioctl(fd, SIOCGNATS, struct natstat *) typedef struct natstat { u_long ns_mapped[2]; u_long ns_added; u_long ns_expire; u_long ns_inuse; nat_t ***ns_table; ipnat_t *ns_list; } natstat_t; BUGS
It would be nice if there were more flexibility when adding and deleting filter rules. FILES
/dev/ipnat SEE ALSO
ipf(4), ipnat(5), ipf(8), ipnat(8), ipfstat(8) IPNAT(4)
All times are GMT -4. The time now is 06:05 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy