Changeset 10

Show
Ignore:
Timestamp:
07/27/07 08:46:56 (1 year ago)
Author:
tmiller
Message:

Man page cleanup:

o remove definition of unused macros
o fix spacing
o use proper lists when describing parameters
o cross-ref correct destroy function
o sipc_send_data now takes a length parameter

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/binary-mq/libsipc/man/man3/sipc_connect.3

    r4 r10  
    11.\" Copyright (C) 2006, 2007 Tresys Technology, LLC 
    22.\" This file is distributed according to the GNU Lesser General Public License 
    3 .de Sh \" Subsection 
    4 .br 
    5 .if t .Sp 
    6 .ne 5 
    7 .PP 
    8 \fB\\$1\fR 
    9 .PP 
    10 .. 
    11 .de Sp \" Vertical space (when we can't use .PP) 
    12 .if t .sp .5v 
    13 .if n .sp 
    14 .. 
    15 .de Ip \" List item 
    16 .br 
    17 .ie \\n(.$>=3 .ne \\$3 
    18 .el .ne 3 
    19 .IP "\\$1" \\$2 
    20 .. 
    213.TH "SIPC_CONNECT" 3 "2006-08-10" "Linux 2.6" "Linux Programmer's Manual" 
    224.SH NAME 
     
    257.ad l 
    268.hy 0 
    27  
    289#include <sipc/sipc.h> 
    29 .sp 
    3010.HP 20 
    3111int\ \fBsipc_connect\fR\ (sipc_t\ \fI*sipc\fR); 
    3212.ad 
    3313.hy 
    34  
    3514.SH "DESCRIPTION" 
    36  
    37 .PP 
    3815\fBsipc_connect\fR connects an IPC handle to an initialized IPC resource.  
    3916A call to \fBsipc_init\fR must be made before calling \fBsipc_connect\fR. 
    40  
    4117.SH "RETURN VALUE" 
    42  
    43 .PP 
    44 This function returns 0 on success, -1 on error. 
    45  
     18This function returns 0 on success, \-1 on error. 
    4619.SH "EXAMPLES" 
    47  
    48 .PP 
    49  
    5020.nf 
    5121/* Sample code */ 
     22 
    5223ipc = sipc_init("ipc_key", size, ipc_type); 
    5324if (sipc_connect(ipc) < 0)  
    5425        sipc_error(ipc, "Unable to connec to IPC resource."); 
    5526.fi 
    56  
    5727.SH "SEE ALSO" 
    58  
    59 .PP 
    60 \fBsipc_init(3)\fR, \fBsipc_disconnect(3)\fR, \fBsipc_error(3)\fR. 
    61  
     28\fBsipc_init(3)\fR, \fBsipc_disconnect(3)\fR, \fBsipc_error(3)\fR 
    6229.SH AUTHOR 
    63 David Windsor <dwindsor@tresys.com>. 
     30David Windsor <dwindsor@tresys.com> 
  • branches/binary-mq/libsipc/man/man3/sipc_create.3

    r4 r10  
    11.\" Copyright (C) 2006, 2007 Tresys Technology, LLC 
    22.\" This file is distributed according to the GNU Lesser General Public License 
    3 .de Sh \" Subsection 
    4 .br 
    5 .if t .Sp 
    6 .ne 5 
    7 .PP 
    8 \fB\\$1\fR 
    9 .PP 
    10 .. 
    11 .de Sp \" Vertical space (when we can't use .PP) 
    12 .if t .sp .5v 
    13 .if n .sp 
    14 .. 
    15 .de Ip \" List item 
    16 .br 
    17 .ie \\n(.$>=3 .ne \\$3 
    18 .el .ne 3 
    19 .IP "\\$1" \\$2 
    20 .. 
    213.TH "SIPC_CREATE" 3 "2006-08-10" "Linux 2.6" "Linux Programmer's Manual" 
    224.SH NAME 
     
    257.ad l 
    268.hy 0 
    27  
    289#include <sipc/sipc.h> 
    29 .sp 
    3010.HP 20 
    3111int\ \fBsipc_create\fR\ (char\ \fI*key\fR, int\ \fIipc_type\fR); 
    3212.ad 
    3313.hy 
    34  
    3514.SH "DESCRIPTION" 
    36  
    37 .PP 
    3815\fBsipc_create\fR creates an IPC resource. The type of IPC resource created  
    3916depends upon the ipc_type flag. It should only be called by helper applications 
    40 not actually participating in the communications process. The function  
    41 parameters are as follows:  
    42  
    43 .nf 
    44 key - A path which will serve as a key identifying the IPC resource to  
     17not actually participating in the communications process. 
     18.PP 
     19The function parameters are as follows:  
     20.TP 
     21.I key 
     22A path which will serve as a key identifying the IPC resource to  
    4523communicating processes. 
    46 ipc_type - One of SIPC_SYSV_MQUEUES or SIPC_SYSV_SHM for message queues or  
     24.TP 
     25.I ipc_type 
     26One of SIPC_SYSV_MQUEUES or SIPC_SYSV_SHM for message queues or  
    4727shared memory, respectively. 
    48 .if 
    49  
    5028.PP 
    5129Once an IPC resource has been created, it can be destroyed by either the  
    5230sending or receiving process. 
    53  
    5431.SH "RETURN VALUE" 
    55 .PP 
    5632This function returns 0 on success, -1 on error. 
    57  
    5833.SH "EXAMPLES" 
    59 .PP 
    60  
    6134.nf 
    6235/* Sample code */ 
    63 #define SIPC_KEY "/tmp/sipc_key"  /* Sender & receiver must know the key */ 
     36 
     37/* Sender & receiver must know the key */ 
     38#define SIPC_KEY "/tmp/sipc_key" 
    6439 
    6540/* Create an IPC resource, specifically a SYSV message queue here */ 
     
    6742        fprintf(stderr, "Unable to create IPC resource."); 
    6843.fi 
    69  
    7044.SH "SEE ALSO" 
    71  
    72 .PP 
    73 \fBsipc_destroy(3)\fR, \fBsipc_init(3)\fR, \fBsipc_connect(3)\fR. 
    74  
     45\fBsipc_destroy_resource(3)\fR, \fBsipc_init(3)\fR, \fBsipc_connect(3)\fR 
    7546.SH AUTHOR 
    76 David Windsor <dwindsor@tresys.com>. 
     47David Windsor <dwindsor@tresys.com> 
  • branches/binary-mq/libsipc/man/man3/sipc_destroy_handle.3

    r4 r10  
    11.\" Copyright (C) 2006, 2007 Tresys Technology, LLC 
    22.\" This file is distributed according to the GNU Lesser General Public License 
    3 .de Sh \" Subsection 
    4 .br 
    5 .if t .Sp 
    6 .ne 5 
    7 .PP 
    8 \fB\\$1\fR 
    9 .PP 
    10 .. 
    11 .de Sp \" Vertical space (when we can't use .PP) 
    12 .if t .sp .5v 
    13 .if n .sp 
    14 .. 
    15 .de Ip \" List item 
    16 .br 
    17 .ie \\n(.$>=3 .ne \\$3 
    18 .el .ne 3 
    19 .IP "\\$1" \\$2 
    20 .. 
    213.TH "SIPC_DESTROY_HANDLE" 3 "2006-08-10" "Linux 2.6" "Linux Programmer's Manual" 
    224.SH NAME 
    23 sipc_destroy_handle\- Free resources associated with a secure IPC handle 
     5sipc_destroy_handle \- Free resources associated with a secure IPC handle 
    246.SH "SYNOPSIS" 
    257.ad l 
    268.hy 0 
    27  
    289#include <sipc/sipc.h> 
    29 .sp 
    3010.HP 20 
    3111void\ \fBsipc_destroy_handle\fR\ (sipc_t\ \fI*sipc\fR); 
    3212.ad 
    3313.hy 
    34  
    3514.SH "DESCRIPTION" 
    36  
    37 .PP 
    3815\fBsipc_destroy_handle\fR frees memory associated with a secure IPC handle  
    3916that was obtained via \fBsipc_init\fR.  
    40  
    4117.SH "RETURN VALUE" 
    42 .PP 
    43 This function does not have a return value. 
    44  
     18This function has no return value. 
    4519.SH "SEE ALSO" 
    46  
    47 .PP 
    48 \fBsipc_init(3)\fR, \fBsipc_create\fR, \fBsipc_connect(3)\fR, \fBsipc_disconnect(3)\fR. 
    49  
     20\fBsipc_init(3)\fR, \fBsipc_create\fR, \fBsipc_connect(3)\fR, 
     21\fBsipc_disconnect(3)\fR 
    5022.SH AUTHOR 
    51 David Windsor <dwindsor@tresys.com>. 
     23David Windsor <dwindsor@tresys.com> 
  • branches/binary-mq/libsipc/man/man3/sipc_destroy_resource.3

    r4 r10  
    11.\" Copyright (C) 2006, 2007 Tresys Technology, LLC 
    22.\" This file is distributed according to the GNU Lesser General Public License 
    3 .de Sh \" Subsection 
    4 .br 
    5 .if t .Sp 
    6 .ne 5 
    7 .PP 
    8 \fB\\$1\fR 
    9 .PP 
    10 .. 
    11 .de Sp \" Vertical space (when we can't use .PP) 
    12 .if t .sp .5v 
    13 .if n .sp 
    14 .. 
    15 .de Ip \" List item 
    16 .br 
    17 .ie \\n(.$>=3 .ne \\$3 
    18 .el .ne 3 
    19 .IP "\\$1" \\$2 
    20 .. 
    213.TH "SIPC_DESTROY_HANDLE" 3 "2006-08-10" "Linux 2.6" "Linux Programmer's Manual" 
    224.SH NAME 
    23 sipc_destroy_resource\- Free IPC resources associated with a secure IPC handle 
     5sipc_destroy_resource \- Free IPC resources associated with a secure IPC handle 
    246.SH "SYNOPSIS" 
    257.ad l 
    268.hy 0 
    27  
    289#include <sipc/sipc.h> 
    29 .sp 
    3010.HP 20 
    3111void\ \fBsipc_destroy_resource\fR\ (char\ \fI*key\fR, int\ \fIipc_type\fR); 
    3212.ad 
    3313.hy 
    34  
    3514.SH "DESCRIPTION" 
    36  
    37 .PP 
    3815\fBsipc_destroy_resource\fR frees IPC resources obtained via \fBsipc_create\fR. 
    3916This function is the inverse of \fBsipc_create\fR and should only be called by  
     
    4118All processes using the IPC resource should call \fBsipc_disconnect\fR before  
    4219the destroyer process calls \fBsipc_destroy_resource\fR. 
     20.PP 
    4321The function parameters are as follows: 
    44  
    45 .nf 
    46 key - A string which will serve as the identifier for the IPC resource. 
    47 ipc_type - One of SIPC_SYSV_MQUEUES or SIPC_SYSV_SHM for message queues  
     22.TP 
     23.I key 
     24A string which will serve as the identifier for the IPC resource. 
     25.TP 
     26.I ipc_type 
     27One of SIPC_SYSV_MQUEUES or SIPC_SYSV_SHM for message queues  
    4828or shared memory, respectively. 
    49 .if 
    50  
    5129.SH "RETURN VALUE" 
    52 .PP 
    53 This function does not have a return value. 
    54  
     30This function has no return value. 
    5531.SH "SEE ALSO" 
    56  
    57 .PP 
    58 \fBsipc_init(3)\fR, \fBsipc_create\fR, \fBsipc_connect(3)\fR, \fBsipc_disconnect(3)\fR. 
    59  
     32\fBsipc_init(3)\fR, \fBsipc_create\fR, \fBsipc_connect(3)\fR, \fBsipc_disconnect(3)\fR 
    6033.SH AUTHOR 
    61 David Windsor <dwindsor@tresys.com>. 
     34David Windsor <dwindsor@tresys.com> 
  • branches/binary-mq/libsipc/man/man3/sipc_disconnect.3

    r4 r10  
    11.\" Copyright (C) 2006, 2007 Tresys Technology, LLC 
    22.\" This file is distributed according to the GNU Lesser General Public License 
    3 .de Sh \" Subsection 
    4 .br 
    5 .if t .Sp 
    6 .ne 5 
    7 .PP 
    8 \fB\\$1\fR 
    9 .PP 
    10 .. 
    11 .de Sp \" Vertical space (when we can't use .PP) 
    12 .if t .sp .5v 
    13 .if n .sp 
    14 .. 
    15 .de Ip \" List item 
    16 .br 
    17 .ie \\n(.$>=3 .ne \\$3 
    18 .el .ne 3 
    19 .IP "\\$1" \\$2 
    20 .. 
    213.TH "SIPC_DISCONNECT" 3 "2006-08-10" "Linux 2.6" "Linux Programmer's Manual" 
    224.SH NAME 
     
    257.ad l 
    268.hy 0 
    27  
    289#include <sipc/sipc.h> 
    29 .sp 
    3010.HP 20 
    3111void\ \fBsipc_disconnect\fR\ (sipc_t\ \fI*sipc\fR); 
    3212.ad 
    3313.hy 
    34  
    3514.SH "DESCRIPTION" 
    36  
    37 .PP 
    3815\fBsipc_disconnect\fR disconnects an IPC handle. The resources held by the  
    3916IPC handle are not freed; a call to \fBsipc_destroy\fR must be made to free  
    4017these resources. 
    41  
    4218.SH "RETURN VALUE" 
    43  
    44 .PP 
    45 No return value. 
    46  
     19This function has no return value. 
    4720.SH "SEE ALSO" 
    48  
    49 .PP 
    50 \fBsipc_connect(3)\fR, \fBsipc_init(3)\fR, \fBsipc_destroy(3)\fR 
    51  
     21\fBsipc_connect(3)\fR, \fBsipc_init(3)\fR, \fBsipc_destroy_handle(3)\fR 
    5222.SH AUTHOR 
    53 David Windsor <dwindsor@tresys.com>. 
     23David Windsor <dwindsor@tresys.com> 
  • branches/binary-mq/libsipc/man/man3/sipc_error.3

    r4 r10  
    11.\" Copyright (C) 2006, 2007 Tresys Technology, LLC 
    22.\" This file is distributed according to the GNU Lesser General Public License 
    3 .de Sh \" Subsection 
    4 .br 
    5 .if t .Sp 
    6 .ne 5 
    7 .PP 
    8 \fB\\$1\fR 
    9 .PP 
    10 .. 
    11 .de Sp \" Vertical space (when we can't use .PP) 
    12 .if t .sp .5v 
    13 .if n .sp 
    14 .. 
    15 .de Ip \" List item 
    16 .br 
    17 .ie \\n(.$>=3 .ne \\$3 
    18 .el .ne 3 
    19 .IP "\\$1" \\$2 
    20 .. 
    213.TH "SIPC_ERROR" 3 "2006-08-10" "Linux 2.6" "Linux Programmer's Manual" 
    224.SH NAME 
     
    257.ad l 
    268.hy 0 
    27  
    289#include <sipc/sipc.h> 
    29 .sp 
    3010.HP 20 
    3111int\ \fBsipc_error\fR\ (sipc_t\ \fI*sipc\fR, char\ \fI*format\fR, ...); 
    3212.ad 
    3313.hy 
    34  
    3514.SH "DESCRIPTION" 
    36  
    37 .PP 
    3815\fBsipc_error\fR is used for reporting errors that occur during secure IPC.  
    3916This function recognizes \fBprintf(3)\fR style format strings.  
    40  
    4117.SH "RETURN VALUE" 
    42 .PP 
    43 This function returns 0 on success, -1 on error. 
    44  
     18This function returns 0 on success, \-1 on error. 
    4519.SH "SEE ALSO" 
    46  
    47 .PP 
    4820\fBsipc_send_data(3)\fR, \fBsipc_connect(3)\fR, \fBsipc_disconnect(3)\fR. 
    49  
    5021.SH AUTHOR 
    51 David Windsor <dwindsor@tresys.com>. 
     22David Windsor <dwindsor@tresys.com> 
  • branches/binary-mq/libsipc/man/man3/sipc_get_data_ptr.3

    r4 r10  
    11.\" Copyright (C) 2006, 2007 Tresys Technology, LLC 
    22.\" This file is distributed according to the GNU Lesser General Public License 
    3 .de Sh \" Subsection 
    4 .br 
    5 .if t .Sp 
    6 .ne 5 
    7 .PP 
    8 \fB\\$1\fR 
    9 .PP 
    10 .. 
    11 .de Sp \" Vertical space (when we can't use .PP) 
    12 .if t .sp .5v 
    13 .if n .sp 
    14 .. 
    15 .de Ip \" List item 
    16 .br 
    17 .ie \\n(.$>=3 .ne \\$3 
    18 .el .ne 3 
    19 .IP "\\$1" \\$2 
    20 .. 
    213.TH "SIPC_GET_DATA_PTR" 3 "2006-08-10" "Linux 2.6" "Linux Programmer's Manual" 
    224.SH NAME 
     
    257.ad l 
    268.hy 0 
    27  
    289#include <sipc/sipc.h> 
    29 .sp 
    3010.HP 20 
    3111char\ *\fBsipc_connect\fR\ (sipc_t\ \fI*sipc\fR); 
    3212.ad 
    3313.hy 
    34  
    3514.SH "DESCRIPTION" 
    36  
    37 .PP 
    3815\fBsipc_connect\fR connects an IPC handle to an initialized IPC resource.  
    3916A call to \fBsipc_init\fR must be made before calling \fBsipc_connect\fR. 
    40  
    4117.SH "RETURN VALUE" 
    42  
    43 .PP 
    4418This function returns a pointer to the handle's data member on success,  
    4519NULL on error. 
    46  
    4720.SH "EXAMPLES" 
    48 .PP 
    49  
    5021.nf 
    5122/* Sample code */ 
     23 
    5224char msg[] = "Hello, world."; 
    53 data = sipc_get_data_ptr(ipc); /* Get a pointer to the handle's data */ 
    54 strncpy(data, msg, size);      /* Copy message into the handle */ 
    55 if (sipc_send_data(ipc) < 0)   /* Send the message */ 
     25data = sipc_get_data_ptr(ipc);       /* Get data pointer from handle */ 
     26strncpy(data, msg, size);            /* Copy message into the handle */ 
     27if (sipc_send_data(ipc, size) < 0)   /* Send the message */ 
    5628        sipc_error(ipc, "Unable to send data."); 
    57  
    5829.fi 
    59  
    6030.SH "SEE ALSO" 
    61  
    62 .PP 
    63 \fBsipc_init(3)\fR, \fBsipc_disconnect(3)\fR, \fBsipc_send_data(3)\fR, \fBsipc_recv_data(3)\fR, \fBsipc_error(3)\fR. 
    64  
     31\fBsipc_init(3)\fR, \fBsipc_disconnect(3)\fR, \fBsipc_send_data(3)\fR, \fBsipc_recv_data(3)\fR, \fBsipc_error(3)\fR 
    6532.SH AUTHOR 
    66 David Windsor <dwindsor@tresys.com>. 
     33David Windsor <dwindsor@tresys.com> 
  • branches/binary-mq/libsipc/man/man3/sipc_init.3

    r4 r10  
    11.\" Copyright (C) 2006, 2007 Tresys Technology, LLC 
    22.\" This file is distributed according to the GNU Lesser General Public License 
    3 .de Sh \" Subsection 
    4 .br 
    5 .if t .Sp 
    6 .ne 5 
    7 .PP 
    8 \fB\\$1\fR 
    9 .PP 
    10 .. 
    11 .de Sp \" Vertical space (when we can't use .PP) 
    12 .if t .sp .5v 
    13 .if n .sp 
    14 .. 
    15 .de Ip \" List item 
    16 .br 
    17 .ie \\n(.$>=3 .ne \\$3 
    18 .el .ne 3 
    19 .IP "\\$1" \\$2 
    20 .. 
    213.TH "SIPC_CONNECT" 3 "2006-08-10" "Linux 2.6" "Linux Programmer's Manual" 
    224.SH NAME 
     
    257.ad l 
    268.hy 0 
    27  
    289#include <sipc/sipc.h> 
    29 .sp 
    3010.HP 20 
    31 int\ \fBsipc_init\fR\ (char\ \fI*key\fR, int\ \fIipc_type\fR, size_t\ \fIsize\fR, int\ \fIsender\fR); 
     11sipc_t\ *\ \fBsipc_init\fR\ (char\ \fI*key\fR, int\ \fIipc_type\fR, size_t\ \fIsize\fR, int\ \fIsender\fR); 
    3212.ad 
    3313.hy 
    34  
    3514.SH "DESCRIPTION" 
    36  
     15\fBsipc_init\fR allocates and initializes an IPC handle, allowing it to be 
     16used in secure communications. 
     17A call to \fBsipc_init\fR must be made before calling \fBsipc_connect\fR. 
    3718.PP 
    38 \fBsipc_init\fR initializes an IPC handle, allowing it to be used in secure  
    39 communications. A call to \fBsipc_init\fR must be made before calling  
    40 \fBsipc_connect\fR. The function parameters are as follows: 
    41  
    42 .nf 
    43 key - A string which serves as an identifier for this IPC resource 
    44 ipc_type - The type of IPC to be used for communications; ex: SIPC_SYSV_MQUEUES 
    45 size - Size, in bytes, of the IPC handle's data member. The data member is allocated  
    46 in \fBsipc_init\fR 
    47 sender - Flag indicating whether this IPC handle will be used for sending 
    48 or receiving data. Sending processes should pass 1 here, receiving processes should pass 0. 
    49 .if 
    50  
     19The function parameters are as follows: 
     20.TP 
     21.I key 
     22A string which serves as an identifier for this IPC resource. 
     23.TP 
     24.I ipc_type 
     25The type of IPC to be used for communications, e.g. SIPC_SYSV_MQUEUES. 
     26.TP 
     27.I size 
     28Size, in bytes, of the IPC handle's data member. The data member is allocated  
     29in \fBsipc_init\fR. 
     30.TP 
     31.I sender 
     32Flag indicating whether this IPC handle will be used for sending 
     33or receiving data. Sending processes should pass 1 here, receiving 
     34processes should pass 0. 
    5135.SH "RETURN VALUE" 
    52 .PP 
    53 This function returns 0 on success, -1 on error. 
    54  
     36This function returns a pointer to the new IPC handle on success, NULL on error. 
    5537.SH "SEE ALSO" 
    56  
    57 .PP 
    58 \fBsipc_destroy(3)\fR, \fBsipc_connect(3)\fR, \fBsipc_disconnect(3)\fR. 
    59  
     38\fBsipc_destroy_handle(3)\fR, \fBsipc_connect(3)\fR, \fBsipc_disconnect(3)\fR 
    6039.SH AUTHOR 
    61 David Windsor <dwindsor@tresys.com>. 
     40David Windsor <dwindsor@tresys.com> 
  • branches/binary-mq/libsipc/man/man3/sipc_recv_data.3

    r4 r10  
    11.\" Copyright (C) 2006, 2007 Tresys Technology, LLC 
    22.\" This file is distributed according to the GNU Lesser General Public License 
    3 .de Sh \" Subsection 
    4 .br 
    5 .if t .Sp 
    6 .ne 5 
    7 .PP 
    8 \fB\\$1\fR 
    9 .PP 
    10 .. 
    11 .de Sp \" Vertical space (when we can't use .PP) 
    12 .if t .sp .5v 
    13 .if n .sp 
    14 .. 
    15 .de Ip \" List item 
    16 .br 
    17 .ie \\n(.$>=3 .ne \\$3 
    18 .el .ne 3 
    19 .IP "\\$1" \\$2 
    20 .. 
    213.TH "SIPC_RECV_DATA" 3 "2006-08-10" "Linux 2.6" "Linux Programmer's Manual" 
    224.SH NAME 
     
    257.ad l 
    268.hy 0 
    27  
    289#include <sipc/sipc.h> 
    29 .sp 
    3010.HP 20 
    3111int\ \fBsipc_recv_data\fR\ (sipc_t\ \fI*sipc\fR, char\ \fI**data\fR, int\ \fI*len\fR); 
    3212.ad 
    3313.hy 
    34  
    3514.SH "DESCRIPTION" 
    36  
     15\fBsipc_recv_data\fR receives data from a secure IPC channel. 
    3716.PP 
    38 \fBsipc_recv_data\fR receives data from a secure IPC channel. The function  
    39 parameters are as follows: 
    40  
    41 .nf 
    42 sipc - An IPC handle  
    43 data - Pointer to a buffer which will hold the data received from the channel  
    44 len - This will hold the total number of bytes received 
    45 .if 
    46  
     17The function parameters are as follows: 
     18.TP 
     19.I sipc 
     20An IPC handle  
     21.TP 
     22.I data 
     23Pointer to a buffer which will hold the data received from the channel  
     24.TP 
     25.I len 
     26This will hold the total number of bytes received 
    4727.PP 
    4828\fBsipc_recv_data\fR allocates the buffer used to store received data. It is  
    4929the responsibility of the caller to free this data. 
    50  
    5130.SH "RETURN VALUE" 
    52 .PP 
    53 This function returns 0 on success, -1 on error. 
    54  
     31This function returns 0 on success, \-1 on error. 
    5532.SH "EXAMPLES" 
    56 .PP 
    57  
    5833.nf 
    5934/* Sample code */ 
     35 
    6036char *data = sipc_get_data_ptr(ipc); 
    6137sipc_recv_data(ipc, &data, &len); 
     
    6541                                  using shared memory */ 
    6642.fi 
    67  
    6843.SH "SEE ALSO" 
    69  
    70 .PP 
    71 \fBsipc_send_data(3)\fR, \fBsipc_connect(3)\fR, \fBsipc_disconnect(3)\fR, \fBsipc_error(3)\fR. 
    72  
     44\fBsipc_send_data(3)\fR, \fBsipc_connect(3)\fR, \fBsipc_disconnect(3)\fR, 
     45\fBsipc_error(3)\fR 
    7346.SH AUTHOR 
    74 David Windsor <dwindsor@tresys.com>. 
     47David Windsor <dwindsor@tresys.com> 
  • branches/binary-mq/libsipc/man/man3/sipc_send_data.3

    r4 r10  
    11.\" Copyright (C) 2006, 2007 Tresys Technology, LLC 
    22.\" This file is distributed according to the GNU Lesser General Public License 
    3 .de Sh \" Subsection 
    4 .br 
    5 .if t .Sp 
    6 .ne 5 
    7 .PP 
    8 \fB\\$1\fR 
    9 .PP 
    10 .. 
    11 .de Sp \" Vertical space (when we can't use .PP) 
    12 .if t .sp .5v 
    13 .if n .sp 
    14 .. 
    15 .de Ip \" List item 
    16 .br 
    17 .ie \\n(.$>=3 .ne \\$3 
    18 .el .ne 3 
    19 .IP "\\$1" \\$2 
    20 .. 
    213.TH "SIPC_SEND_DATA" 3 "2006-08-10" "Linux 2.6" "Linux Programmer's Manual" 
    224.SH NAME 
     
    257.ad l 
    268.hy 0 
    27  
    289#include <sipc/sipc.h> 
    29 .sp 
    3010.HP 20 
    31 int\ \fBsipc_send_data\fR\ (sipc_t\ \fI*sipc\fR); 
     11int\ \fBsipc_send_data\fR\ (sipc_t\ \fI*sipc\fR, int\ \fImsg_len\fR); 
    3212.ad 
    3313.hy 
    34  
    3514.SH "DESCRIPTION" 
    36  
    37 .PP 
    38 \fBsipc_send_data\fR sends the data contained in an IPC handle across a secure  
    39 channel. Depending on the amount of data contained in the handle and the  
    40 underlying IPC mechanism used, fragmentation of the data may occur during  
    41 transmission. Reassembly of fragmented data occurs transparently at the  
    42 receiver's end, with a call to \fBsipc_recv_data\fR. In the case of shared  
    43 memory, the caller must ensure that the size of the data contained in the  
    44 handle does not exceed the system limit for shared memory segment size, in  
    45 which case the data will be truncated prior to transmission.   
    46  
     15\fBsipc_send_data\fR sends \fImsg_len\fR bytes of data contained in an IPC 
     16handle across a secure channel. Depending on the size of \fImsg_len\fR and 
     17the underlying IPC mechanism used, fragmentation of the data may occur 
     18during transmission. Reassembly of fragmented data occurs transparently 
     19at the receiver's end, with a call to \fBsipc_recv_data\fR. In the case of 
     20shared memory, the caller must ensure that the size of the data contained 
     21in the handle does not exceed the system shared memory segment size limit, 
     22in which case the data will be truncated prior to transmission. 
    4723.SH "RETURN VALUE" 
    48 .PP 
    49 This function returns 0 on success, -1 on error. 
    50  
     24This function returns 0 on success, \-1 on error. 
    5125.SH "EXAMPLES" 
    52 .PP 
    53  
    5426.nf 
    5527/* Sample code */ 
     28 
    5629char msg[] = "Hello, world."; 
    57 data = sipc_get_data_ptr(ipc); /* Get a pointer to the handle's data */ 
    58 strncpy(data, msg, size);      /* Copy mesasge into the handle */ 
    59 if (sipc_send_data(ipc) < 0)   /* Send the message */ 
     30data = sipc_get_data_ptr(ipc);       /* Get data pointer from handle */ 
     31strncpy(data, msg, size);            /* Copy mesasge into the handle */ 
     32if (sipc_send_data(ipc, size) < 0)   /* Send the message */ 
    6033        sipc_error(ipc, "Unable to send data."); 
    6134.fi 
    62  
    6335.SH "SEE ALSO" 
    64  
    65 .PP 
    6636\fBsipc_recv_data(3)\fR, \fBsipc_get_data_ptr(3)\fR, \fBsipc_connect(3)\fR, 
    67 \fBsipc_disconnect(3)\fR, \fBsipc_error(3)\fR. 
    68  
     37\fBsipc_disconnect(3)\fR, \fBsipc_error(3)\fR 
    6938.SH AUTHOR 
    70 David Windsor <dwindsor@tresys.com>. 
     39David Windsor <dwindsor@tresys.com> 
  • branches/binary-mq/libsipc/man/man3/sipc_shm_recv_done.3

    r4 r10  
    11.\" Copyright (C) 2006, 2007 Tresys Technology, LLC 
    22.\" This file is distributed according to the GNU Lesser General Public License 
    3 .de Sh \" Subsection 
    4 .br 
    5 .if t .Sp 
    6 .ne 5 
    7 .PP 
    8 \fB\\$1\fR 
    9 .PP 
    10 .. 
    11 .de Sp \" Vertical space (when we can't use .PP) 
    12 .if t .sp .5v 
    13 .if n .sp 
    14 .. 
    15 .de Ip \" List item 
    16 .br 
    17 .ie \\n(.$>=3 .ne \\$3 
    18 .el .ne 3 
    19 .IP "\\$1" \\$2 
    20 .. 
    213.TH "SIPC_SHM_RECV_DONE" 3 "2006-08-10" "Linux 2.6" "Linux Programmer's Manual" 
    224.SH NAME 
     
    257.ad l 
    268.hy 0 
    27  
    289#include <sipc/sipc.h> 
    29 .sp 
    3010.HP 20 
    3111int\ \fBsipc_shm_recv_done\fR\ (sipc_t\ \fI*sipc\fR); 
    3212.ad 
    3313.hy 
    34  
    3514.SH "DESCRIPTION" 
    36  
    37 .PP 
    3815\fBsipc_shm_recv_done\fR is called by an application receiving messages using  
    3916shared memory during secure IPC. \fBsipc_shm_recv_done\fR unblocks the sending  
    4017process, allowing it to send more data. This function only needs to be called  
    4118when using shared memory as a backend for secure IPC.  
    42  
    4319.SH "RETURN VALUE" 
    44  
    45 .PP 
    46 This function returns 0 on success, -1 on error. 
    47  
     20This function returns 0 on success, \-1 on error. 
    4821.SH "EXAMPLES" 
    49 .PP 
    50  
    5122.nf 
    5223/* Sample code */ 
     24 
    5325char *data = sipc_get_data_ptr(ipc); 
    5426sipc_recv_data(ipc, &data, &len); 
     
    5830                                  using shared memory */ 
    5931.fi 
    60  
    6132.SH "SEE ALSO" 
    62  
    63 .PP 
    64 \fBsipc_send_data(3)\fR, \fBsipc_recv_data(3)\fR, \fBsipc_error(3)\fR. 
    65  
     33\fBsipc_send_data(3)\fR, \fBsipc_recv_data(3)\fR, \fBsipc_error(3)\fR 
    6634.SH AUTHOR 
    67 David Windsor <dwindsor@tresys.com>. 
     35David Windsor <dwindsor@tresys.com>