nb_lib.h (87867) | nb_lib.h (150802) |
---|---|
1/* 2 * Copyright (c) 2000, Boris Popov 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 16 unchanged lines hidden (view full) --- 25 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 26 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30 * SUCH DAMAGE. 31 * 32 * $Id: nb_lib.h,v 1.2 2000/07/17 01:49:27 bp Exp $ | 1/* 2 * Copyright (c) 2000, Boris Popov 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 16 unchanged lines hidden (view full) --- 25 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 26 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30 * SUCH DAMAGE. 31 * 32 * $Id: nb_lib.h,v 1.2 2000/07/17 01:49:27 bp Exp $ |
33 * $FreeBSD: head/contrib/smbfs/include/netsmb/nb_lib.h 150802 2005-10-02 08:32:49Z bp $ |
|
33 */ 34#ifndef _NETSMB_NB_LIB_H_ 35#define _NETSMB_NB_LIB_H_ 36 37/* 38 * Error codes 39 */ 40#define NBERR_INVALIDFORMAT 0x0001 --- 17 unchanged lines hidden (view full) --- 58 */ 59struct nb_ctx { 60 int nb_flags; 61 int nb_timo; 62 char * nb_scope; /* NetBIOS scope */ 63 char * nb_nsname; /* name server */ 64 struct sockaddr_in nb_ns; /* ip addr of name server */ 65 struct sockaddr_in nb_lastns; | 34 */ 35#ifndef _NETSMB_NB_LIB_H_ 36#define _NETSMB_NB_LIB_H_ 37 38/* 39 * Error codes 40 */ 41#define NBERR_INVALIDFORMAT 0x0001 --- 17 unchanged lines hidden (view full) --- 59 */ 60struct nb_ctx { 61 int nb_flags; 62 int nb_timo; 63 char * nb_scope; /* NetBIOS scope */ 64 char * nb_nsname; /* name server */ 65 struct sockaddr_in nb_ns; /* ip addr of name server */ 66 struct sockaddr_in nb_lastns; |
67 long nb_nmbtcpport; /* default: NMB_TCP_PORT = 137 */ 68 long nb_smbtcpport; /* default: SMB_TCP_PORT = 139 */ |
|
66}; 67 68/* 69 * resource record 70 */ 71struct nbns_rr { 72 u_char * rr_name; /* compressed NETBIOS name */ 73 u_int16_t rr_type; --- 49 unchanged lines hidden (view full) --- 123int nb_name_len(struct nb_name *); 124int nb_name_encode(struct nb_name *, u_char *); 125int nb_encname_len(const char *); 126 127int nb_snballoc(int namelen, struct sockaddr_nb **); 128void nb_snbfree(struct sockaddr*); 129int nb_sockaddr(struct sockaddr *, struct nb_name *, struct sockaddr_nb **); 130 | 69}; 70 71/* 72 * resource record 73 */ 74struct nbns_rr { 75 u_char * rr_name; /* compressed NETBIOS name */ 76 u_int16_t rr_type; --- 49 unchanged lines hidden (view full) --- 126int nb_name_len(struct nb_name *); 127int nb_name_encode(struct nb_name *, u_char *); 128int nb_encname_len(const char *); 129 130int nb_snballoc(int namelen, struct sockaddr_nb **); 131void nb_snbfree(struct sockaddr*); 132int nb_sockaddr(struct sockaddr *, struct nb_name *, struct sockaddr_nb **); 133 |
131int nb_resolvehost_in(const char *, struct sockaddr **); | 134int nb_resolvehost_in(const char *, struct sockaddr **, long); |
132int nbns_resolvename(const char *, struct nb_ctx *, struct sockaddr **); 133int nb_getlocalname(char *name); 134int nb_enum_if(struct nb_ifdesc **, int); 135 136const char *nb_strerror(int error); 137 138int nb_ctx_create(struct nb_ctx **); 139void nb_ctx_done(struct nb_ctx *); 140int nb_ctx_setns(struct nb_ctx *, const char *); 141int nb_ctx_setscope(struct nb_ctx *, const char *); 142int nb_ctx_resolve(struct nb_ctx *); 143int nb_ctx_readrcsection(struct rcfile *, struct nb_ctx *, const char *, int); 144 145__END_DECLS 146 147#endif /* !_NETSMB_NB_LIB_H_ */ | 135int nbns_resolvename(const char *, struct nb_ctx *, struct sockaddr **); 136int nb_getlocalname(char *name); 137int nb_enum_if(struct nb_ifdesc **, int); 138 139const char *nb_strerror(int error); 140 141int nb_ctx_create(struct nb_ctx **); 142void nb_ctx_done(struct nb_ctx *); 143int nb_ctx_setns(struct nb_ctx *, const char *); 144int nb_ctx_setscope(struct nb_ctx *, const char *); 145int nb_ctx_resolve(struct nb_ctx *); 146int nb_ctx_readrcsection(struct rcfile *, struct nb_ctx *, const char *, int); 147 148__END_DECLS 149 150#endif /* !_NETSMB_NB_LIB_H_ */ |