Lines Matching refs:sb
126 static int nsldapi_add_to_cb_pollfds( Sockbuf *sb,
128 static int nsldapi_clear_from_cb_pollfds( Sockbuf *sb,
130 static int nsldapi_find_in_cb_pollfds( Sockbuf *sb,
465 nsldapi_connect_to_host( LDAP *ld, Sockbuf *sb, const char *hostlist,
493 &sb->sb_ext_io_fns.lbextiofn_socket_arg
512 sb->sb_sd = s;
520 if (( *krbinstancep = nsldapi_host_connected_to( sb )) != NULL
736 nsldapi_close_connection( LDAP *ld, Sockbuf *sb )
739 nsldapi_os_closesocket( sb->sb_sd );
741 ld->ld_extclose_fn( sb->sb_sd,
742 sb->sb_ext_io_fns.lbextiofn_socket_arg );
749 nsldapi_host_connected_to( Sockbuf *sb )
758 if ( getpeername( sb->sb_sd, (struct sockaddr *)&sin, &len ) == -1 ) {
785 nsldapi_iostatus_interest_write( LDAP *ld, Sockbuf *sb )
801 if ( nsldapi_add_to_os_pollfds( sb->sb_sd,
806 if ( !FD_ISSET( sb->sb_sd,
808 FD_SET( sb->sb_sd,
815 if ( nsldapi_add_to_cb_pollfds( sb,
837 nsldapi_iostatus_interest_read( LDAP *ld, Sockbuf *sb )
853 if ( nsldapi_add_to_os_pollfds( sb->sb_sd,
858 if ( !FD_ISSET( sb->sb_sd,
860 FD_SET( sb->sb_sd,
867 if ( nsldapi_add_to_cb_pollfds( sb,
888 nsldapi_iostatus_interest_clear( LDAP *ld, Sockbuf *sb )
904 if ( nsldapi_clear_from_os_pollfds( sb->sb_sd,
908 if ( nsldapi_clear_from_os_pollfds( sb->sb_sd,
913 if ( FD_ISSET( sb->sb_sd,
915 FD_CLR( sb->sb_sd,
919 if ( FD_ISSET( sb->sb_sd,
921 FD_CLR( sb->sb_sd,
928 if ( nsldapi_clear_from_cb_pollfds( sb,
932 if ( nsldapi_clear_from_cb_pollfds( sb,
949 * Return a non-zero value if sb is ready for write.
952 nsldapi_iostatus_is_write_ready( LDAP *ld, Sockbuf *sb )
970 rc = nsldapi_find_in_os_pollfds( sb->sb_sd,
974 rc = FD_ISSET( sb->sb_sd,
979 rc = nsldapi_find_in_cb_pollfds( sb,
995 * Return a non-zero value if sb is ready for read.
998 nsldapi_iostatus_is_read_ready( LDAP *ld, Sockbuf *sb )
1016 rc = nsldapi_find_in_os_pollfds( sb->sb_sd,
1020 rc = FD_ISSET( sb->sb_sd,
1025 rc = nsldapi_find_in_cb_pollfds( sb,
1345 * returns 1 if "sb" was added to pollfds.
1350 nsldapi_add_to_cb_pollfds( Sockbuf *sb, struct nsldapi_cb_statusinfo *pip,
1355 /* first we check to see if "sb" is already in our pollfds */
1358 if ( NSLDAPI_CB_POLL_MATCH( sb, pip->cbsi_pollfds[ i ] )) {
1373 * "sb" is not currently being poll'd on -- add to array.
1403 pip->cbsi_pollfds[ openslot ].lpoll_fd = sb->sb_sd;
1405 sb->sb_ext_io_fns.lbextiofn_socket_arg;
1413 * returns 1 if any "events" from "sb" were removed from pollfds
1414 * returns 0 of "sb" wasn't in pollfds or if events did not overlap.
1417 nsldapi_clear_from_cb_pollfds( Sockbuf *sb,
1423 if ( NSLDAPI_CB_POLL_MATCH( sb, pip->cbsi_pollfds[ i ] )) {
1438 return( 0 ); /* "sb" was not found */
1443 * returns 1 if any "revents" from "sb" were set in pollfds revents field.
1447 nsldapi_find_in_cb_pollfds( Sockbuf *sb, struct nsldapi_cb_statusinfo *pip,
1453 if ( NSLDAPI_CB_POLL_MATCH( sb, pip->cbsi_pollfds[ i ] )) {
1463 return( 0 ); /* "sb" was not found */
1468 * Install read and write functions into lber layer / sb
1471 nsldapi_install_lber_extiofns( LDAP *ld, Sockbuf *sb )
1476 if ( NULL != sb ) {
1483 if ( ber_sockbuf_set_option( sb, LBER_SOCKBUF_OPT_EXT_IO_FNS,