BRL-CAD
#include "common.h"
#include <stddef.h>
Include dependency graph for pkg.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  pkg_switch
 
struct  pkg_header
 
struct  pkg_conn
 

Macros

#define PKG_STDIO_MODE   -3
 
#define PKG_MAGIC   0x41FE
 
#define PKG_STREAMLEN   (32*1024)
 
#define PKC_NULL   ((struct pkg_conn *)0)
 
#define PKC_ERROR   ((struct pkg_conn *)(-1L))
 
#define pkg_send_vls(type, vlsp, pkg)    pkg_send( (type), bu_vls_addr((vlsp)), bu_vls_strlen((vlsp))+1, (pkg) )
 

Typedefs

typedef void(* pkg_callback) (struct pkg_conn *, char *)
 
typedef void(* pkg_errlog) (const char *msg)
 

Functions

struct pkg_connpkg_open (const char *host, const char *service, const char *protocol, const char *username, const char *passwd, const struct pkg_switch *switchp, pkg_errlog errlog)
 
void pkg_close (struct pkg_conn *pc)
 
int pkg_process (struct pkg_conn *)
 
int pkg_suckin (struct pkg_conn *)
 
int pkg_send (int type, const char *buf, size_t len, struct pkg_conn *pc)
 
int pkg_2send (int type, const char *buf1, size_t len1, const char *buf2, size_t len2, struct pkg_conn *pc)
 
int pkg_stream (int type, const char *buf, size_t len, struct pkg_conn *pc)
 
int pkg_flush (struct pkg_conn *pc)
 
int pkg_waitfor (int type, char *buf, size_t len, struct pkg_conn *pc)
 
char * pkg_bwaitfor (int type, struct pkg_conn *pc)
 
int pkg_block (struct pkg_conn *pc)
 
struct pkg_connpkg_transerver (const struct pkg_switch *switchp, pkg_errlog errlog)
 
int pkg_permserver (const char *service, const char *protocol, int backlog, pkg_errlog)
 
int pkg_permserver_ip (const char *ipOrHostname, const char *service, const char *protocol, int backlog, pkg_errlog errlog)
 
struct pkg_connpkg_getclient (int fd, const struct pkg_switch *switchp, pkg_errlog errlog, int nodelay)
 
unsigned short pkg_gshort (char *buf)
 
unsigned long pkg_glong (char *buf)
 
char * pkg_pshort (char *buf, unsigned short s)
 
char * pkg_plong (char *buf, unsigned long l)
 
const char * pkg_version (void)
 

Variables

int pkg_permport
 

Detailed Description

LIBPKG provides routines to manage multiplexing and de-multiplexing synchronous and asynchronous messages across stream connections.

Definition in file pkg.h.