SHNET_PEER_LOCAL
0
The local machine.
SHNET_PEER_IPV4
1
A remote IPv4 network destination.
SHNET_PEER_IPV6
2
A remote IPv6 network destination.
SHNET_PEER_VPN_IPV4
3
A IPv4 network destination on the sharenet VPN.
SHNET_PEER_VPN_IPV6
4
A IPv6 network destination on the sharenet VPN.
SHNET_BROADCAST
5
Global network destination.
SHARCH_32BIT
(1 << 0)
32bit hardware (i.e.
not 64bit)
SHARCH_LINUX
(1 << 1)
linux
SHARCH_WIN
(1 << 2)
win/doh
SHARCH_MAC
(1 << 3)
apple/mac
SHARCH_BSD
(1 << 4)
bsd/freebsd
SHARCH_SUN
(1 << 5)
sun os
SHARCH_MIPS
(1 << 7)
(android) mips chipset
SHARCH_BIGEND
(1 << 7)
(aix/4) big endian / network byte order
shpeer_kpub
(& (_peer)->key.pub)
public key reference of peer
shpeer_kpriv
(& (_peer)->key.priv)
priveleged key reference of peer
typedef struct shpeer_addr_t shpeer_addr_t
typedef struct shpeer_key_t shpeer_key_t
typedef struct shpeer_t shpeer_t
A local or remote network address.
void shpeer_set_default
(shpeer_t *peer)
Set the application's default peer reference.
See
shapp_init()
group__libshare__syspam_1gae81d0a766271573db756b2e09f12302e
member
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
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
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
void shpeer_free
(shpeer_t **peer_p)
Free the resources associated with a peer reference.
char* shpeer_print
(shpeer_t *peer)
A string representation of the libshare peer.
int shpeer_localhost
(shpeer_t *peer)
Test whether a peer identity is referencing localhost.
Return Value
TRUE if a localhost and FALSE if not.
char* shpeer_get_app
(shpeer_t *peer)
Obtain a label referencing the peer entity.
void shpeer_host
(shpeer_t *peer, char *hostname, int *port_p)
struct sockaddr* shpeer_addr
(shpeer_t *peer)