netatalk  4.5.0
Free and Open Source Apple Filing Protocol (AFP) Server
Loading...
Searching...
No Matches
asp.h File Reference
#include <sys/types.h>
#include <netatalk/at.h>
#include <atalk/atp.h>
#include <atalk/afp.h>
#include <atalk/server_child.h>

Go to the source code of this file.

Data Structures

struct  ASP
 

Macros

#define ASP_HDRSIZ   4
 
#define ASP_CMDSIZ   578
 
#define ASP_MAXPACKETS   8
 
#define ASP_CMDMAXSIZ   (ASP_CMDSIZ + ASP_HDRSIZ)
 
#define ASP_DATASIZ   (ASP_CMDSIZ*ASP_MAXPACKETS)
 
#define ASP_DATAMAXSIZ   ((ASP_CMDSIZ + ASP_HDRSIZ)*ASP_MAXPACKETS)
 
#define asp_status   asp_u.asu_status.as_status
 
#define asp_slen   asp_u.asu_status.as_slen
 
#define asp_seq   asp_u.asu_seq
 
#define ASPFL_SLS   1
 
#define ASPFL_SSS   2
 
#define ASPFUNC_CLOSE   1
 
#define ASPFUNC_CMD   2
 
#define ASPFUNC_STAT   3
 
#define ASPFUNC_OPEN   4
 
#define ASPFUNC_TICKLE   5
 
#define ASPFUNC_WRITE   6
 
#define ASPFUNC_WRTCONT   7
 
#define ASPFUNC_ATTN   8
 
#define ASPERR_OK   0x0000
 
#define ASPERR_BADVERS   0xfbd6
 
#define ASPERR_BUFSMALL   0xfbd5
 
#define ASPERR_NOSESS   0xfbd4
 
#define ASPERR_NOSERV   0xfbd3
 
#define ASPERR_PARM   0xfbd2
 
#define ASPERR_SERVBUSY   0xfbd1
 
#define ASPERR_SESSCLOS   0xfbd0
 
#define ASPERR_SIZERR   0xfbcf
 
#define ASPERR_TOOMANY   0xfbce
 
#define ASPERR_NOACK   0xfbcd
 
#define asp_wrtreply(a, b)   asp_cmdreply((a), (b))
 

Typedefs

typedef struct ASPASP
 

Functions

ASP asp_init (ATP)
 
void asp_setstatus (ASP, char *, const int)
 
ASP asp_getsession (ASP, server_child_t *, const int, afp_child_t **)
 This call handles open, tickle, and getstatus requests.
 
int asp_close (ASP)
 
int asp_shutdown (ASP)
 
int asp_attention (ASP, AFPUserBytes)
 
int asp_getrequest (ASP)
 
int asp_cmdreply (ASP, int)
 
int asp_wrtcont (ASP, char *, size_t *)
 
void asp_kill (int)
 
int asp_tickle (ASP, const uint8_t, struct sockaddr_at *)
 
void asp_stop_tickle (void)
 

Macro Definition Documentation

◆ ASP_CMDMAXSIZ

#define ASP_CMDMAXSIZ   (ASP_CMDSIZ + ASP_HDRSIZ)

◆ ASP_CMDSIZ

#define ASP_CMDSIZ   578

◆ ASP_DATAMAXSIZ

#define ASP_DATAMAXSIZ   ((ASP_CMDSIZ + ASP_HDRSIZ)*ASP_MAXPACKETS)

◆ ASP_DATASIZ

#define ASP_DATASIZ   (ASP_CMDSIZ*ASP_MAXPACKETS)

◆ ASP_HDRSIZ

#define ASP_HDRSIZ   4

◆ ASP_MAXPACKETS

#define ASP_MAXPACKETS   8

◆ asp_seq

#define asp_seq   asp_u.asu_seq

◆ asp_slen

#define asp_slen   asp_u.asu_status.as_slen

◆ asp_status

#define asp_status   asp_u.asu_status.as_status

◆ asp_wrtreply

#define asp_wrtreply (   a,
 
)    asp_cmdreply((a), (b))

◆ ASPERR_BADVERS

#define ASPERR_BADVERS   0xfbd6

◆ ASPERR_BUFSMALL

#define ASPERR_BUFSMALL   0xfbd5

◆ ASPERR_NOACK

#define ASPERR_NOACK   0xfbcd

◆ ASPERR_NOSERV

#define ASPERR_NOSERV   0xfbd3

◆ ASPERR_NOSESS

#define ASPERR_NOSESS   0xfbd4

◆ ASPERR_OK

#define ASPERR_OK   0x0000

◆ ASPERR_PARM

#define ASPERR_PARM   0xfbd2

◆ ASPERR_SERVBUSY

#define ASPERR_SERVBUSY   0xfbd1

◆ ASPERR_SESSCLOS

#define ASPERR_SESSCLOS   0xfbd0

◆ ASPERR_SIZERR

#define ASPERR_SIZERR   0xfbcf

◆ ASPERR_TOOMANY

#define ASPERR_TOOMANY   0xfbce

◆ ASPFL_SLS

#define ASPFL_SLS   1

◆ ASPFL_SSS

#define ASPFL_SSS   2

◆ ASPFUNC_ATTN

#define ASPFUNC_ATTN   8

◆ ASPFUNC_CLOSE

#define ASPFUNC_CLOSE   1

◆ ASPFUNC_CMD

#define ASPFUNC_CMD   2

◆ ASPFUNC_OPEN

#define ASPFUNC_OPEN   4

◆ ASPFUNC_STAT

#define ASPFUNC_STAT   3

◆ ASPFUNC_TICKLE

#define ASPFUNC_TICKLE   5

◆ ASPFUNC_WRITE

#define ASPFUNC_WRITE   6

◆ ASPFUNC_WRTCONT

#define ASPFUNC_WRTCONT   7

Typedef Documentation

◆ ASP

typedef struct ASP * ASP

Function Documentation

◆ asp_attention()

int asp_attention ( ASP  asp,
AFPUserBytes  flags 
)
extern

◆ asp_close()

int asp_close ( ASP  asp)
extern

◆ asp_cmdreply()

int asp_cmdreply ( ASP  asp,
int  result 
)
extern

◆ asp_getrequest()

int asp_getrequest ( ASP  asp)
extern

◆ asp_getsession()

ASP asp_getsession ( ASP  asp,
server_child_t server_children,
const int  tickleval,
afp_child_t **  childp 
)
extern

This call handles open, tickle, and getstatus requests.

Note
On a successful open, it forks a child process.
Returns
an ASP to the child and parent and NULL if there is an error.

◆ asp_init()

ASP asp_init ( ATP  atp)
extern

◆ asp_kill()

void asp_kill ( int  sig)
extern

kill children

◆ asp_setstatus()

void asp_setstatus ( ASP  asp,
char *  status,
const int  slen 
)
extern

◆ asp_shutdown()

int asp_shutdown ( ASP  asp)
extern

◆ asp_stop_tickle()

void asp_stop_tickle ( void  )
extern

◆ asp_tickle()

int asp_tickle ( ASP  asp,
const uint8_t  sid,
struct sockaddr_at sat 
)
extern

send off a tickle

◆ asp_wrtcont()

int asp_wrtcont ( ASP  asp,
char *  buf,
size_t *  buflen 
)
extern