]> git.sur5r.net Git - openldap/commitdiff
Added some OpenLDAP extensions for determining ldapi:// sock/peername
authorLuke Howard <lukeh@openldap.org>
Wed, 22 Jan 2003 14:41:51 +0000 (14:41 +0000)
committerLuke Howard <lukeh@openldap.org>
Wed, 22 Jan 2003 14:41:51 +0000 (14:41 +0000)
and whether connection is UDP

servers/slapd/slapi/slapi.h
servers/slapd/slapi/slapi_pblock.c
servers/slapd/slapi/slapi_utils.c

index e0c36c1eb48224648f34a5eeae87cddee2d8a67e..f3671729028aaa4504ba4f9319a481672bd76f90 100644 (file)
@@ -111,9 +111,12 @@ LDAP_BEGIN_DECL
 #define SLAPI_REQUESTOR_ISUPDATEDN             142
 #define SLAPI_IS_REPLICATED_OPERATION          SLAPI_REQUESTOR_ISUPDATEDN
 #define SLAPI_CONN_DN                          143
+#define SLAPI_CONN_AUTHTYPE                            144
 #define SLAPI_CONN_CLIENTIP                    145
 #define SLAPI_CONN_SERVERIP                    146
-#define SLAPI_CONN_AUTHTYPE                            144
+#define SLAPI_X_CONN_CLIENTPATH                        1300
+#define SLAPI_X_CONN_SERVERPATH                        1301
+#define SLAPI_X_CONN_IS_UDP                    1302
 
 #define SLAPD_AUTH_NONE   "none"
 #define SLAPD_AUTH_SIMPLE "simple"
index 71822447d3b9829d88dbc9a6d57b83dd5e2587e9..8d20932f093dfe3dbfdcee1bb9c77f21cf1cf6ae 100644 (file)
@@ -41,6 +41,9 @@ isOkNetscapeParam( int param )
        case SLAPI_CONN_AUTHTYPE:
        case SLAPI_CONN_AUTHMETHOD:
        case SLAPI_CONN_CERT:
+       case SLAPI_X_CONN_IS_UDP:
+       case SLAPI_X_CONN_CLIENTPATH:
+       case SLAPI_X_CONN_SERVERPATH:
        case SLAPI_IBM_CONN_DN_ALT:
        case SLAPI_IBM_CONN_DN_ORIG:
        case SLAPI_IBM_GSSAPI_CONTEXT:
index b8356898ea5c4f47a68994432f7951d6c4914d54..f61d8b38a4b319ea6c667c4d23031005057c00a0 100644 (file)
@@ -1499,14 +1499,28 @@ int slapi_x_connection_set_pb( Slapi_PBlock *pb, Connection *conn )
                rc = slapi_pblock_set( pb, SLAPI_CONN_CLIENTIP, (void *)&conn->c_peer_name.bv_val[3] );
                if ( rc != LDAP_SUCCESS )
                        return rc;
+       } else if ( strncmp( conn->c_peer_name.bv_val, "PATH=", 5 ) == 0 ) {
+               rc = slapi_pblock_set( pb, SLAPI_X_CONN_CLIENTPATH, (void *)&conn->c_peer_name.bv_val[5] );
+               if ( rc != LDAP_SUCCESS )
+                       return rc;
        }
 
        if ( strncmp( conn->c_sock_name.bv_val, "IP=", 3 ) == 0 ) {
                rc = slapi_pblock_set( pb, SLAPI_CONN_SERVERIP, (void *)&conn->c_sock_name.bv_val[3] );
                if ( rc != LDAP_SUCCESS )
                        return rc;
+       } else if ( strncmp( conn->c_sock_name.bv_val, "PATH=", 5 ) == 0 ) {
+               rc = slapi_pblock_set( pb, SLAPI_X_CONN_SERVERPATH, (void *)&conn->c_sock_name.bv_val[5] );
+               if ( rc != LDAP_SUCCESS )
+                       return rc;
        }
 
+#ifdef LDAP_CONNECTIONLESS
+       rc = slapi_pblock_set( pb, SLAPI_X_CONN_IS_UDP, (void *)conn->c_is_udp );
+       if ( rc != LDAP_SUCCESS )
+               return rc;
+#endif
+
        rc = slapi_pblock_set( pb, SLAPI_CONN_ID, (void *)conn->c_connid );
        if ( rc != LDAP_SUCCESS )
                return rc;