DB_BASE(9F) Kernel Functions for Drivers DB_BASE(9F)NAME
DB_BASE, DB_LIM, DB_REF, DB_TYPE - Data block access macros
SYNOPSIS
#include <sys/stream.h>
#include <sys/strsun.h>
uchar_t *DB_BASE(mblk_t *mp);
uchar_t *DB_LIM(mblk_t *mp);
uchar_t DB_TYPE(mblk_t *mp);
uchar_t DB_REF(mblk_t *mp);
INTERFACE LEVEL
Solaris DDI specific (Solaris DDI).
PARAMETERS
mp Message block to be accessed.
DESCRIPTION
These macros provide compact access to public members of the datab(9S) structure associated with the specified message block.
In all cases, these macros are equivalent to directly accessing the underlying fields of the datab(9S) associated with the specified mes-
sage block. Specifically:
DB_BASE(mp) is equivalent to mp->b_datap->db_base.
DB_LIM(mp) is equivalent to mp->b_datap->db_lim.
DB_TYPE(mp) is equivalent to mp->b_datap->db_type.
DB_REF(mp) is equivalent to mp->b_datap->db_ref.
CONTEXT
These functions can be called from user, kernel or interrupt context.
SEE ALSO msgb(9S), datab(9S)
STREAMS Programming Guide
SunOS 5.10 9 June 2004 DB_BASE(9F)
Check Out this Related Man Page
MBLKHEAD(9F) Kernel Functions for Drivers MBLKHEAD(9F)NAME
MBLKHEAD, MBLKIN, MBLKL, MBLKSIZE, MBLKTAIL - Message block utility macros
SYNOPSIS
#include <sys/stream.h>
#include <sys/strsun.h>
int MBLKHEAD(mblk_t *mp);
int MBLKTAIL(mblk_t *mp);
int MBLKSIZE(mblk_t *mp);
int MBLKL(mblk_t *mp);
int MBLKIN(mblk_t *mp, int offset, int len);
INTERFACE LEVEL
Solaris DDI specific (Solaris DDI).
PARAMETERS
mp Message to be examined.
offset Offset from mp->b_rptr from which to start examining.
len Number of bytes to examine.
DESCRIPTION
The MBLKHEAD() macro calculates the number of bytes between the first byte and the first unread byte of the message block, that is:
mp->b_rptr - mp->b_datap->db_base.
The MBLKTAIL() macro calculates the number of bytes between the first unwritten byte and the last byte of the message block, that is:
mp->b_datap->db_lim - mp->b_wptr.
The MBLKSIZE() macros calculates the total size of the message block, that is: mp->b_datap->db_lim - mp->b_datap->db_base.
The MBLKL() macro calculates the length of the message block, that is: mp->b_wptr - mp->b_rptr.
The MBLKIN() macro checks whether the byte range specified by offset and len resides entirely within the message block.
RETURN VALUES
The MBLKHEAD(), MBLKTAIL(), MBLKL() and MBLKSIZE() functions all return the appropriate byte count, as specified above. MBLKIN() returns
non-zero if the check succeeds, or zero if it fails.
CONTEXT
These functions can be called from user, kernel or interrupt context.
NOTES
These macros may evaluate any of their arguments more than once. This precludes passing arguments with side effects.
These macros assume the message itself is well formed, that is: mp->b_datap->db_base <= mp->b_rptr <= mp->b_wptr <= mp->b_datap->db_lim.
SEE ALSO msgb(9S)
STREAMS Programming Guide
SunOS 5.10 9 June 2004 MBLKHEAD(9F)
Hi,
i have a properties file a.prop where entry is like
PROCESS_IDX=0
Now in my shell schript i am doing like this.
#!/bin/sh
. a.prop
..............
-.......................
while read line
do
# tokenize the string by ",".
var=(`echo $line | tr ',' ' '`)
echo $PROCESS_IDX -->... (6 Replies)
Hi all,
This is my first post in this forum, can i request you to guide, where i am going wrong with the error below.
34: Syntax error: "fi" unexpected (expecting "then")
#!/bin/sh
argCount=0
mysql_path=$USER_INSTALL_DIR$
for i in $*; do
/A argCount+=1
done
if ;then
echo... (2 Replies)
Hi,
Ihave shifted this thread which i posted in linux forum to here if i am fault please correct me.
When i excute this below script i am getting the follwing error can any one please look into it for persual.
./sample_oracle_tradescope.sh: 25: showDEFAULTUsage: not found
... (6 Replies)
To read/write to a DB from Java or Perl, you usually have to install/reference several drivers and write a whole bunch of boilerplate DB access code.
I'm curious if someone has written a command line utility for Unix/Linux for simple database access for the major providers, something like:
... (3 Replies)
Hi,
Normally, I would do
cat /etc/oratab | grep -v "^#" | grep -v "^*" > /tmp/oratab.00
while read line
do
echo $line
done < /tmp/oratab.00I want to know whether it is possible to use an array instead of re-directing it to file?
As a test, I did something like below:
#!/bin/ksh
... (6 Replies)
i have a text file consists of different file names like:
line 1: lib/libIMb.so message broker file
line 2: lil/imbdfg.lil message broker file
i need to extract libIMb.so and imbdfg.lil files from those lines and save them in a variable. so that i can search for... (9 Replies)
Hello all,
I need to write a script which has following requirement:
Need to read the filenames from text file and then search for the above read files in the required directory and if match found backup them in a backup folder.
And also need to compare and verify whether the files in the... (7 Replies)
Hi,
I am a junior dba and started carrier very new. I have a batch file to create some script of db creation. I want that batch file to convert in .sh file so that I can directly run that in the AIX box to generate those files.
Please help me with the code for AIX. Batch file is here:
... (2 Replies)
I got a issue with one binary application when i run it it will not run and after doing a truss i noticed the following errors in the log dose anyone know what the errors are about and how to fix them?, I also inserted a image of the error log in case their is something i have mists, thank you for... (19 Replies)
Hi,
I want to share storage using glusterfs. I follow tutorial as below:
https://www.howtoforge.com/how-to-install-glusterfs-with-a-replicated-volume-over-2-nodes-on-ubuntu-14.04
But why size not same as i mount from lvm?
# gluster volume info
Volume Name: mysql-db
Type: Replicate... (0 Replies)