milter-connection
3
milter managerライブラリ

# milter-connection

## 概要

    #define             MILTER_CONNECTION_DEFAULT_BACKLOG
    #define             MILTER_CONNECTION_ERROR
    struct              MilterGenericSocketAddress;
    enum                MilterConnectionError;
    GQuark              milter_connection_error_quark       (void);
    gboolean            milter_connection_parse_spec        (const gchar *spec,
                                                             gint *domain,
                                                             struct sockaddr **address,
                                                             socklen_t *address_size,
                                                             GError **error);
    GIOChannel *        milter_connection_listen            (const gchar *spec,
                                                             gint backlog,
                                                             struct sockaddr **address,
                                                             socklen_t *address_size,
                                                             gboolean remove_unix_socket,
                                                             GError **error);
    gchar *             milter_connection_address_to_spec   (const struct sockaddr *address);

## 説明

## 詳細

### MILTER_CONNECTION_DEFAULT_BACKLOG

    #  define MILTER_CONNECTION_DEFAULT_BACKLOG SOMAXCONN

### MILTER_CONNECTION_ERROR

    #define MILTER_CONNECTION_ERROR           (milter_connection_error_quark())

### struct MilterGenericSocketAddress

    struct MilterGenericSocketAddress {
        union {
            struct sockaddr base;
            struct sockaddr_un un;
            struct sockaddr_in inet;
            struct sockaddr_in6 inet6;
        } address;
    };

### enum MilterConnectionError

    typedef enum {
        MILTER_CONNECTION_ERROR_INVALID_FORMAT,
        MILTER_CONNECTION_ERROR_SOCKET_FAILURE,
        MILTER_CONNECTION_ERROR_SET_SOCKET_OPTION_FAILURE,
        MILTER_CONNECTION_ERROR_ACCEPT_FAILURE,
        MILTER_CONNECTION_ERROR_BIND_FAILURE,
        MILTER_CONNECTION_ERROR_LISTEN_FAILURE,
        MILTER_CONNECTION_ERROR_UNIX_SOCKET
    } MilterConnectionError;

### milter_connection_error_quark ()

    GQuark              milter_connection_error_quark       (void);

### milter_connection_parse_spec ()

    gboolean            milter_connection_parse_spec        (const gchar *spec,
                                                             gint *domain,
                                                             struct sockaddr **address,
                                                             socklen_t *address_size,
                                                             GError **error);

### milter_connection_listen ()

    GIOChannel *        milter_connection_listen            (const gchar *spec,
                                                             gint backlog,
                                                             struct sockaddr **address,
                                                             socklen_t *address_size,
                                                             gboolean remove_unix_socket,
                                                             GError **error);

### milter_connection_address_to_spec ()

    gchar *             milter_connection_address_to_spec   (const struct sockaddr *address);