Gamgee
You miserable little maggot. I'll stove your head in!
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros 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)
#define knet_tell (   fp)    ((fp)->offset)
#define KNF_TYPE_FTP   2
#define KNF_TYPE_HTTP   3
#define KNF_TYPE_LOCAL   1
#define netclose (   fd)    close(fd)
#define netread (   fd,
  ptr,
  len 
)    read(fd, ptr, len)
#define netwrite (   fd,
  ptr,
  len 
)    write(fd, ptr, len)

Typedef Documentation

typedef struct knetFile_s knetFile

Function Documentation

int knet_close ( knetFile fp)
knetFile* knet_dopen ( int  fd,
const char *  mode 
)
knetFile* knet_open ( const char *  fn,
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 
)