7 #include <libsmbclient.h>
8 #include "get_auth_data_fn.h"
11 int main(int argc
, char * argv
[])
19 char * pSmbPath
= NULL
;
26 pSmbPath
= "smb://RANDOM/Public/bigfile";
35 "%s [ smb://path/to/file ]\n",
40 smbc_init(get_auth_data_fn
, debug
);
42 printf("Open file %s\n", pSmbPath
);
46 if ((fd
= smbc_open(pSmbPath
, O_RDONLY
, 0)) < 0)
52 printf("Beginning read loop.\n");
56 ret
= smbc_read(fd
, buffer
, sizeof(buffer
));
58 if (ret
> 0) fwrite(buffer
, 1, ret
, stdout
);
72 printf("Elapsed time: %d seconds\n", t1
- t0
);