file
shpeer_8h
[ ]
define
SHNET_PEER_LOCAL
0
The local machine.
define
SHNET_PEER_IPV4
1
A remote IPv4 network destination.
define
SHNET_PEER_IPV6
2
A remote IPv6 network destination.
define
SHNET_PEER_VPN_IPV4
3
A IPv4 network destination on the sharenet VPN.
define
SHNET_PEER_VPN_IPV6
4
A IPv6 network destination on the sharenet VPN.
define
SHNET_BROADCAST
5
Global network destination.
define
SHARCH_32BIT
(1 << 0)
32bit hardware (i.e.
not 64bit)
define
SHARCH_LINUX
(1 << 1)
linux
define
SHARCH_WIN
(1 << 2)
win/doh
define
SHARCH_MAC
(1 << 3)
apple/mac
define
SHARCH_BSD
(1 << 4)
bsd/freebsd
define
SHARCH_SUN
(1 << 5)
sun os
define
SHARCH_MIPS
(1 << 7)
(android) mips chipset
define
SHARCH_BIGEND
(1 << 7)
(aix/4) big endian / network byte order
define
shpeer_kpub
(& (_peer)->key.pub)
public key reference of peer
define
shpeer_kpriv
(& (_peer)->key.priv)
priveleged key reference of peer
typedef
typedef struct shpeer_addr_t shpeer_addr_t
typedef
typedef struct shpeer_key_t shpeer_key_t
typedef
typedef struct shpeer_t shpeer_t
A local or remote network address.
function
void shpeer_set_default
(shpeer_t *peer)
Set the application's default peer reference.
See
shapp_init() group__libshare__syspam_1gae81d0a766271573db756b2e09f12302e member
function
shpeer_t* shpeer
(void)
Returns the default peer reference to the local user for IPv4.
Return Value
Information relevant to identifying a peer host.
Note
Use to free resources allocated. shpeer_free() group__libshare_1gab4154f7e7070c78b331bb9cb3fde93e6 member
function
shpeer_t* ashpeer
(void)
Returns the default peer reference to the local user for IPv4 without dynamic memory allocation.
Return Value
Information relevant to identifying a peer host.
Note
Do NOT use to free. shpeer_free() group__libshare_1gab4154f7e7070c78b331bb9cb3fde93e6 member
function
shpeer_t* shpeer_init
(char *appname, char *hostname)
Generate a peer reference.
Param
appname
An application name an optional group name in "[@]app" format or NULL for a un-named generic "libshare" app.
hostname
A host and optional port in "[:]" format or NULL for a localhost reference.
Return Value
A peer identity reference.
Note
Use to free. shpeer_free() group__libshare_1gab4154f7e7070c78b331bb9cb3fde93e6 member
function
void shpeer_free
(shpeer_t **peer_p)
Free the resources associated with a peer reference.
function
char* shpeer_print
(shpeer_t *peer)
A string representation of the libshare peer.
function
int shpeer_localhost
(shpeer_t *peer)
Test whether a peer identity is referencing localhost.
Return Value
TRUE if a localhost and FALSE if not.
function
char* shpeer_get_app
(shpeer_t *peer)
Obtain a label referencing the peer entity.
function
void shpeer_host
(shpeer_t *peer, char *hostname, int *port_p)
function
struct sockaddr* shpeer_addr
(shpeer_t *peer)