Separating info out of the libsmbclient.h include file

Tom Jansen tom at
Mon Oct 21 12:57:01 GMT 2002

Tom Jansen wrote:
> Hi Richard,
> Richard Sharpe wrote:
>> A problem has arrisen with libsmbclient in head, in that there is too 
>> much
>> info exposed in libsmbclient.h.

New idea:

example for internal include file:

typedef struct _SMBCSRV {
	struct cli_state cli;
	dev_t dev;
	BOOL no_pathinfo2;
	int server_fd;

	struct _SMBCSRV *next, *prev;

In the client include file we could just do:

typedef struct _SMBCSRV SMBCSRV;

The client _only_ uses pointers to this type of structs so size does not 
matter. All the allocating of memory is done inside libsmbclient.

This is IMHO a quite nice solution. I ripped it from the FILE type glibc 

Please let me know what you think about this solution.


More information about the samba-technical mailing list