netatalk: main.c File Reference

netatalk 4.5.0
Free and Open Source Apple Filing Protocol (AFP) Server
Loading...
Searching...
No Matches
main.c File Reference
`#include <string.h>`
`#include <sys/param.h>`
`#include <sys/time.h>`
`#include <sys/uio.h>`
`#include <sys/file.h>`
`#include <sys/socket.h>`
`#include <atalk/logger.h>`
`#include <sys/types.h>`
`#include <sys/wait.h>`
`#include <errno.h>`
`#include <signal.h>`
`#include <stdio.h>`
`#include <stdlib.h>`
`#include <netdb.h>`
`#include <fcntl.h>`
`#include <unistd.h>`
`#include <netatalk/at.h>`
`#include <atalk/compat.h>`
`#include <atalk/atp.h>`
`#include <atalk/pap.h>`
`#include <atalk/util.h>`
`#include <atalk/nbp.h>`
`#include <atalk/unicode.h>`
`#include "printer.h"`
`#include "printcap.h"`
`#include "session.h"`
`#include "uam_auth.h"`
`#include "print_cups.h"`

## Data Structures
struct | rbuf_t

## Macros
#define | WEXITSTATUS(stat_val)
#define | WIFEXITED(stat_val)
#define | MACCHARSET "MAC_ROMAN"
#define | PF_CONFBUFFER 1024

## Functions
static void | sig_handler (int signo)
int | getstatus (struct printer *pr, rbuf_t *buf)
int | rprintcap (struct printer *pr)
static void | getprinters (char *cf)
static void | papd_exit (const int i)
static void | papd_cleanup (int n)
static void | die (int n)
static void | reap (int sig)
int | main (int ac, char **av)
static void | free_printer_fields (struct printer *pr)

## Variables
static rbuf_t | r_buf
struct printer | defprinter
struct printer * | printers = NULL
int | debug = 0
static char * | conffile = _PATH_PAPDCONF
char * | printcap = _PATH_PAPDPRINTCAP
unsigned char | connid
unsigned char | quantum
unsigned char | sock
unsigned char | oquantum = PAP_MAXQUANTUM
char * | cannedstatus = "status: print spooler processing job"
struct printer * | printer = NULL
char * | version = VERSION
static char * | pidfile = PATH_PAPD_LOCK
char * | uamlist
char * | uampath = _PATH_PAPDUAMPATH
static volatile sig_atomic_t | stop_requested = 0

## Macro Definition Documentation

## ◆ MACCHARSET

#define MACCHARSET "MAC_ROMAN"

## ◆ PF_CONFBUFFER

#define PF_CONFBUFFER 1024

## ◆ WEXITSTATUS

#define WEXITSTATUS | ( |  | stat_val | ) |

Value:
((unsigned)(stat_val) >> 8)

## ◆ WIFEXITED

#define WIFEXITED | ( |  | stat_val | ) |

Value:
(((stat_val) & 255) == 0)

## Function Documentation

## ◆ die()

void die | ( | int | n | ) |
| static

## ◆ free_printer_fields()

void free_printer_fields | ( | struct printer * | pr | ) |
| static

## ◆ getprinters()

void getprinters | ( | char * | cf | ) |
| static

## ◆ getstatus()

int getstatus | ( | struct printer * | pr,
|  | rbuf_t * | buf )

## ◆ main()

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

## ◆ papd_cleanup()

void papd_cleanup | ( | int | n | ) |
| static

## ◆ papd_exit()

void papd_exit | ( | const int | i | ) |
| static

## ◆ reap()

void reap | ( | int | sig | ) |
| static

## ◆ rprintcap()

int rprintcap | ( | struct printer * | pr | ) |

## ◆ sig_handler()

void sig_handler | ( | int | signo | ) |
| static

## Variable Documentation

## ◆ cannedstatus

char* cannedstatus = "status: print spooler processing job"

## ◆ conffile

char* conffile = _PATH_PAPDCONF
| static

## ◆ connid

unsigned char connid

## ◆ debug

int debug = 0

## ◆ defprinter

struct printer defprinter

## ◆ oquantum

unsigned char oquantum = PAP_MAXQUANTUM

## ◆ pidfile

char* pidfile = PATH_PAPD_LOCK
| static

## ◆ printcap

char* printcap = _PATH_PAPDPRINTCAP

## ◆ printer

struct printer* printer = NULL

## ◆ printers

struct printer* printers = NULL

## ◆ quantum

unsigned char quantum

## ◆ r_buf

rbuf_t r_buf
| static

## ◆ sock

unsigned char sock

## ◆ stop_requested

volatile sig_atomic_t stop_requested = 0
| static

## ◆ uamlist

char* uamlist

## ◆ uampath

char* uampath = _PATH_PAPDUAMPATH

## ◆ version

char* version = VERSION