netatalk  4.4.0dev
Free and Open Source Apple Filing Protocol (AFP) Server
Loading...
Searching...
No Matches
atp.h File Reference
#include <stdint.h>
#include <sys/types.h>
#include <sys/time.h>
#include <netatalk/at.h>

Go to the source code of this file.

Data Structures

struct  atphdr
struct  atpxobuf
struct  atpbuf
struct  atp_handle
struct  sreq_st
struct  rres_st
struct  rreq_st
struct  sres_st
struct  atp_block

Macros

#define ATP_MAXDATA   (578+4) /* maximum ATP data size */
#define ATP_BUFSIZ   587 /* maximum packet size */
#define ATP_HDRSIZE   5 /* includes DDP type field */
#define ATP_TRELMASK   0x07 /* mask all but TREL */
#define ATP_RELTIME   30 /* base release timer (in secs) */
#define ATP_TREL30   0x0 /* release time codes */
#define ATP_TREL1M   0x1 /* these are passed in flags of */
#define ATP_TREL2M   0x2 /* atp_sreq call, and set in the */
#define ATP_TREL4M   0x3 /* packet control info. */
#define ATP_TREL8M   0x4
#define ATP_TRIES_INFINITE   -1 /* for atp_sreq, etc */
#define atp_sockaddr(h)
#define atp_fileno(x)
#define atp_sreqdata   atp_data.sreqdata.atpd_data
#define atp_sreqdlen   atp_data.sreqdata.atpd_dlen
#define atp_sreqtries   atp_data.sreqdata.atpd_tries
#define atp_sreqto   atp_data.sreqdata.atpd_to
#define atp_rresiov   atp_data.rresdata.atpd_iov
#define atp_rresiovcnt   atp_data.rresdata.atpd_iovcnt
#define atp_rreqdata   atp_data.rreqdata.atpd_data
#define atp_rreqdlen   atp_data.rreqdata.atpd_dlen
#define atp_sresiov   atp_data.sresdata.atpd_iov
#define atp_sresiovcnt   atp_data.sresdata.atpd_iovcnt
#define ATP_STS   (1<<3) /* Send Transaction Status */
#define ATP_EOM   (1<<4) /* End Of Message */
#define ATP_XO   (1<<5) /* eXactly Once mode */
#define ATP_FUNCMASK   (3<<6) /* mask all but function */
#define ATP_TREQ   (1<<6) /* Trans. REQuest */
#define ATP_TRESP   (2<<6) /* Trans. RESPonse */
#define ATP_TREL   (3<<6) /* Trans. RELease */

Typedefs

typedef struct atp_handleATP

Functions

ATP atp_open (uint8_t, const struct at_addr *)
int atp_close (ATP)
int atp_sreq (ATP, struct atp_block *, int, uint8_t)
int atp_rresp (ATP, struct atp_block *)
int atp_rsel (ATP, struct sockaddr_at *, int)
int atp_rreq (ATP, struct atp_block *)
int atp_sresp (ATP, struct atp_block *)

Macro Definition Documentation

◆ ATP_BUFSIZ

#define ATP_BUFSIZ   587 /* maximum packet size */

◆ ATP_EOM

#define ATP_EOM   (1<<4) /* End Of Message */

◆ atp_fileno

#define atp_fileno ( x)
Value:
((x)->atph_socket)

◆ ATP_FUNCMASK

#define ATP_FUNCMASK   (3<<6) /* mask all but function */

◆ ATP_HDRSIZE

#define ATP_HDRSIZE   5 /* includes DDP type field */

◆ ATP_MAXDATA

#define ATP_MAXDATA   (578+4) /* maximum ATP data size */

◆ ATP_RELTIME

#define ATP_RELTIME   30 /* base release timer (in secs) */

◆ atp_rreqdata

#define atp_rreqdata   atp_data.rreqdata.atpd_data

◆ atp_rreqdlen

#define atp_rreqdlen   atp_data.rreqdata.atpd_dlen

◆ atp_rresiov

#define atp_rresiov   atp_data.rresdata.atpd_iov

◆ atp_rresiovcnt

#define atp_rresiovcnt   atp_data.rresdata.atpd_iovcnt

◆ atp_sockaddr

#define atp_sockaddr ( h)
Value:
(&(h)->atph_saddr)

◆ atp_sreqdata

#define atp_sreqdata   atp_data.sreqdata.atpd_data

◆ atp_sreqdlen

#define atp_sreqdlen   atp_data.sreqdata.atpd_dlen

◆ atp_sreqto

#define atp_sreqto   atp_data.sreqdata.atpd_to

◆ atp_sreqtries

#define atp_sreqtries   atp_data.sreqdata.atpd_tries

◆ atp_sresiov

#define atp_sresiov   atp_data.sresdata.atpd_iov

◆ atp_sresiovcnt

#define atp_sresiovcnt   atp_data.sresdata.atpd_iovcnt

◆ ATP_STS

#define ATP_STS   (1<<3) /* Send Transaction Status */

◆ ATP_TREL

#define ATP_TREL   (3<<6) /* Trans. RELease */

◆ ATP_TREL1M

#define ATP_TREL1M   0x1 /* these are passed in flags of */

◆ ATP_TREL2M

#define ATP_TREL2M   0x2 /* atp_sreq call, and set in the */

◆ ATP_TREL30

#define ATP_TREL30   0x0 /* release time codes */

◆ ATP_TREL4M

#define ATP_TREL4M   0x3 /* packet control info. */

◆ ATP_TREL8M

#define ATP_TREL8M   0x4

◆ ATP_TRELMASK

#define ATP_TRELMASK   0x07 /* mask all but TREL */

◆ ATP_TREQ

#define ATP_TREQ   (1<<6) /* Trans. REQuest */

◆ ATP_TRESP

#define ATP_TRESP   (2<<6) /* Trans. RESPonse */

◆ ATP_TRIES_INFINITE

#define ATP_TRIES_INFINITE   -1 /* for atp_sreq, etc */

◆ ATP_XO

#define ATP_XO   (1<<5) /* eXactly Once mode */

Typedef Documentation

◆ ATP

typedef struct atp_handle* ATP

Function Documentation

◆ atp_close()

int atp_close ( ATP ah)
extern

◆ atp_open()

ATP atp_open ( uint8_t port,
const struct at_addr * saddr )
extern

◆ atp_rreq()

int atp_rreq ( ATP ah,
struct atp_block * atpb )
extern

◆ atp_rresp()

int atp_rresp ( ATP ah,
struct atp_block * atpb )
extern

◆ atp_rsel()

int atp_rsel ( ATP ah,
struct sockaddr_at * faddr,
int func )
extern

◆ atp_sreq()

int atp_sreq ( ATP ah,
struct atp_block * atpb,
int respcount,
uint8_t flags )
extern

◆ atp_sresp()

int atp_sresp ( ATP ah,
struct atp_block * atpb )
extern