Linc Reference Manual
<<< Previous Page | Home | Up | Next Page >>>

# linc-protocol

## Name

linc-protocol -- The protocols exposed

## Synopsis

    enum        LINCProtocolFlags;
    void        (*LINCProtocolSetupFunc)        (int fd,
                                                 LINCConnectionOptions cnx_flags);
    void        (*LINCProtocolDestroyFunc)      (int fd,
                                                 const char *host_info,
                                                 const char *serv_info);
    gboolean    (*LINCProtocolGetSockInfoFunc)  (const LINCProtocolInfo *proto,
                                                 const struct sockaddr *sockaddr,
                                                 gchar **hostname,
                                                 gchar **service);
    struct      LINCProtocolInfo;
    void        linc_set_tmpdir                 (const char *dir);

## Description

## Details

### enum LINCProtocolFlags

    typedef enum {
    	LINC_PROTOCOL_SECURE     = 1<<0,
    	LINC_PROTOCOL_NEEDS_BIND = 1<<1
    } LINCProtocolFlags;

### LINCProtocolSetupFunc ()

    void        (*LINCProtocolSetupFunc)        (int fd,
                                                 LINCConnectionOptions cnx_flags);

`fd` : |
`cnx_flags` : |

### LINCProtocolDestroyFunc ()

    void        (*LINCProtocolDestroyFunc)      (int fd,
                                                 const char *host_info,
                                                 const char *serv_info);

`fd` : |
`host_info` : |
`serv_info` : |

### LINCProtocolGetSockInfoFunc ()

    gboolean    (*LINCProtocolGetSockInfoFunc)  (const LINCProtocolInfo *proto,
                                                 const struct sockaddr *sockaddr,
                                                 gchar **hostname,
                                                 gchar **service);

`proto` : |
`sockaddr` : |
`hostname` : |
`service` : |
Returns : |

### struct LINCProtocolInfo

    struct LINCProtocolInfo {
    	const char                 *name;
    	int                         family;
    	int                         addr_len;
    	int                         stream_proto_num;
    	LINCProtocolFlags           flags;

    	LINCProtocolSetupFunc       setup;
    	LINCProtocolDestroyFunc     destroy;
    	LINCProtocolGetSockAddrFunc get_sockaddr;
    	LINCProtocolGetSockInfoFunc get_sockinfo;
    	LINCProtocolIsLocal         is_local;
    	/* This structure is private and may be extended in future */
    	gpointer                    dummy[8];
    };

### linc_set_tmpdir ()

    void        linc_set_tmpdir                 (const char *dir);

Set the temporary directory used by linc to `dir`.

This directory is used for the creation of UNIX sockets.

`dir` : | directory name.

<<< Previous Page | Home | Up | Next Page >>>
Linc | LINCConnection