NVBIO
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Macros | Typedefs | Functions
knetfile.h File Reference
#include <stdint.h>
#include <fcntl.h>

Go to the source code of this file.

Classes

struct  knetFile_s
 

Macros

#define netread(fd, ptr, len)   read(fd, ptr, len)
 
#define netwrite(fd, ptr, len)   write(fd, ptr, len)
 
#define netclose(fd)   close(fd)
 
#define KNF_TYPE_LOCAL   1
 
#define KNF_TYPE_FTP   2
 
#define KNF_TYPE_HTTP   3
 
#define knet_tell(fp)   ((fp)->offset)
 
#define knet_fileno(fp)   ((fp)->fd)
 

Typedefs

typedef struct knetFile_s knetFile
 

Functions

knetFileknet_open (const char *fn, const char *mode)
 
knetFileknet_dopen (int fd, const char *mode)
 
ssize_t knet_read (knetFile *fp, void *buf, size_t len)
 
off_t knet_seek (knetFile *fp, off_t off, int whence)
 
int knet_close (knetFile *fp)
 

Macro Definition Documentation

#define knet_fileno (   fp)    ((fp)->fd)

Definition at line 40 of file knetfile.h.

#define knet_tell (   fp)    ((fp)->offset)

Definition at line 39 of file knetfile.h.

#define KNF_TYPE_FTP   2

Definition at line 21 of file knetfile.h.

#define KNF_TYPE_HTTP   3

Definition at line 22 of file knetfile.h.

#define KNF_TYPE_LOCAL   1

Definition at line 20 of file knetfile.h.

#define netclose (   fd)    close(fd)

Definition at line 10 of file knetfile.h.

#define netread (   fd,
  ptr,
  len 
)    read(fd, ptr, len)

Definition at line 8 of file knetfile.h.

#define netwrite (   fd,
  ptr,
  len 
)    write(fd, ptr, len)

Definition at line 9 of file knetfile.h.

Typedef Documentation

typedef struct knetFile_s knetFile

Function Documentation

int knet_close ( knetFile fp)

Definition at line 566 of file knetfile.c.

knetFile* knet_dopen ( int  fd,
const char *  mode 
)

Definition at line 496 of file knetfile.c.

knetFile* knet_open ( const char *  fn,
const char *  mode 
)

Definition at line 452 of file knetfile.c.

ssize_t knet_read ( knetFile fp,
void *  buf,
size_t  len 
)

Definition at line 504 of file knetfile.c.

off_t knet_seek ( knetFile fp,
off_t  off,
int  whence 
)

Definition at line 533 of file knetfile.c.