netatalk 4.5.0
Free and Open Source Apple Filing Protocol (AFP) Server
Loading...
Searching...
No Matches
pap.c File Reference
`#include <sys/types.h>`
`#include <sys/time.h>`
`#include <sys/uio.h>`
`#include <netatalk/at.h>`
`#include <errno.h>`
`#include <atalk/atp.h>`
`#include <atalk/pap.h>`
`#include <atalk/nbp.h>`
`#include <atalk/util.h>`
`#include <fcntl.h>`
`#include <stdio.h>`
`#include <string.h>`
`#include <stdlib.h>`

## Macros
#define | _PATH_PAPRC ".paprc"
#define | IMAGEWRITER "ImageWriter"
#define | IMAGEWRITER_LQ "LQ"

## Functions
static void | updatestatus (char *s, int len)
static int | send_file (int fd, ATP atp, int lastfile, int is_imagewriter)
static void | usage (char *path)
static char * | paprc (void)
int | main (int ac, char **av)

## Variables
static char * | printer = NULL
static char * | status = NULL
static int | noeof = 0
static int | waitforprinter = 0
static unsigned char | connid
static unsigned char | quantum
static unsigned char | oquantum = PAP_MAXQUANTUM
static struct sockaddr_at | sat
static char | cbuf [8]
static struct nbpnve | nn
static ATP | satp
static char | fbuf [PAP_MAXQUANTUM][4+PAP_MAXDATA]
static struct iovec | rfiov [PAP_MAXQUANTUM]
static struct iovec | sniov [PAP_MAXQUANTUM]
static char | nbuf [PAP_MAXQUANTUM][4+PAP_MAXDATA]
static struct iovec | rniov [PAP_MAXQUANTUM]
static struct iovec | sfiov [PAP_MAXQUANTUM]
static int | debug
static int | data = 0
static unsigned char | port
static uint16_t | seq = 0

## Macro Definition Documentation

## ◆ _PATH_PAPRC

#define _PATH_PAPRC ".paprc"

## ◆ IMAGEWRITER

#define IMAGEWRITER "ImageWriter"

## ◆ IMAGEWRITER_LQ

#define IMAGEWRITER_LQ "LQ"

## Function Documentation

## ◆ main()

int main | ( | int | ac,
|  | char ** | av )

## ◆ paprc()

char * paprc | ( | void |  | ) |
| static

## ◆ send_file()

int send_file | ( | int | fd,
|  | ATP | atp,
|  | int | lastfile,
|  | int | is_imagewriter )
| static

## ◆ updatestatus()

void updatestatus | ( | char * | s,
|  | int | len )
| static

## ◆ usage()

void usage | ( | char * | path | ) |
| static

## Variable Documentation

## ◆ cbuf

char cbuf[8]
| static

## ◆ connid

unsigned char connid
| static

## ◆ data

int data = 0
| static

## ◆ debug

int debug
| static

## ◆ fbuf

char fbuf[PAP_MAXQUANTUM][4+PAP_MAXDATA]
| static

## ◆ nbuf

char nbuf[PAP_MAXQUANTUM][4+PAP_MAXDATA]
| static

## ◆ nn

struct nbpnve nn
| static

## ◆ noeof

int noeof = 0
| static

## ◆ oquantum

unsigned char oquantum = PAP_MAXQUANTUM
| static

## ◆ port

unsigned char port
| static

## ◆ printer

char* printer = NULL
| static

## ◆ quantum

unsigned char quantum
| static

## ◆ rfiov

struct iovec rfiov[PAP_MAXQUANTUM]
| static

Initial value:
= {
{ fbuf[0] + 4, 0 },
{ fbuf[1] + 4, 0 },
{ fbuf[2] + 4, 0 },
{ fbuf[3] + 4, 0 },
{ fbuf[4] + 4, 0 },
{ fbuf[5] + 4, 0 },
{ fbuf[6] + 4, 0 },
{ fbuf[7] + 4, 0 },
}
fbuf
static char fbuf[PAP_MAXQUANTUM][4+PAP_MAXDATA]
Definition pap.c:104

## ◆ rniov

struct iovec rniov[PAP_MAXQUANTUM]
| static

Initial value:
= {
{ nbuf[0], 0 },
{ nbuf[1], 0 },
{ nbuf[2], 0 },
{ nbuf[3], 0 },
{ nbuf[4], 0 },
{ nbuf[5], 0 },
{ nbuf[6], 0 },
{ nbuf[7], 0 },
}
nbuf
static char nbuf[PAP_MAXQUANTUM][4+PAP_MAXDATA]
Definition pap.c:127

## ◆ sat

struct sockaddr_at sat
| static

## ◆ satp

ATP satp
| static

## ◆ seq

uint16_t seq = 0
| static

## ◆ sfiov

struct iovec sfiov[PAP_MAXQUANTUM]
| static

Initial value:
= {
{ nbuf[0] + 4, 0 },
{ nbuf[1] + 4, 0 },
{ nbuf[2] + 4, 0 },
{ nbuf[3] + 4, 0 },
{ nbuf[4] + 4, 0 },
{ nbuf[5] + 4, 0 },
{ nbuf[6] + 4, 0 },
{ nbuf[7] + 4, 0 },
}

## ◆ sniov

struct iovec sniov[PAP_MAXQUANTUM]
| static

Initial value:
= {
{ fbuf[0], 0 },
{ fbuf[1], 0 },
{ fbuf[2], 0 },
{ fbuf[3], 0 },
{ fbuf[4], 0 },
{ fbuf[5], 0 },
{ fbuf[6], 0 },
{ fbuf[7], 0 },
}

## ◆ status

char* status = NULL
| static

## ◆ waitforprinter

int waitforprinter = 0
| static