netatalk 4.4.3
Free and Open Source Apple Filing Protocol (AFP) Server
Loading...
Searching...
No Matches
afp_dsi.c File Reference
`#include <arpa/inet.h>`
`#include <errno.h>`
`#include <netinet/in.h>`
`#include <netinet/tcp.h>`
`#include <setjmp.h>`
`#include <signal.h>`
`#include <stdbool.h>`
`#include <stdio.h>`
`#include <stdlib.h>`
`#include <string.h>`
`#include <sys/socket.h>`
`#include <sys/stat.h>`
`#include <sys/time.h>`
`#include <sys/types.h>`
`#include <sys/wait.h>`
`#include <time.h>`
`#include <unistd.h>`
`#include <atalk/afp_util.h>`
`#include <atalk/compat.h>`
`#include <atalk/dsi.h>`
`#include <atalk/fce_api.h>`
`#include <atalk/globals.h>`
`#include <atalk/logger.h>`
`#include <atalk/netatalk_conf.h>`
`#include <atalk/server_ipc.h>`
`#include <atalk/spotlight.h>`
`#include <atalk/util.h>`
`#include <atalk/uuid.h>`
`#include "auth.h"`
`#include "dircache.h"`
`#include "directory.h"`
`#include "fork.h"`
`#include "switch.h"`

## Data Structures
struct | rc_elem_t

## Macros
#define | SOL_TCP IPPROTO_TCP

## Functions
static void | afp_dsi_close (AFPObj *obj)
static void | afp_dsi_die (int sig)
static void | afp_dsi_transfer_session (int sig)
static void | afp_dsi_timedown (int sig)
static void | afp_dsi_reload (int sig)
static void | afp_dsi_debug (int sig)
static void | afp_dsi_getmesg (int sig)
static void | alarm_handler (int sig)
static void | child_handler (int sig)
static void | pending_request (DSI *dsi)
void | afp_over_dsi_sighandlers (AFPObj *obj)
void | afp_over_dsi (AFPObj *obj)

## Variables
AFPObj * | AFPobj = NULL
static rc_elem_t | replaycache [REPLAYCACHE_SIZE]
static sigjmp_buf | recon_jmp
volatile int | reload_request = 0
static volatile sig_atomic_t | debug_request = 0

## Macro Definition Documentation

## ◆ SOL_TCP

#define SOL_TCP IPPROTO_TCP

## Function Documentation

## ◆ afp_dsi_close()

void afp_dsi_close | ( | AFPObj * | obj | ) |
| static

## ◆ afp_dsi_debug()

void afp_dsi_debug | ( | int | sig | ) |
| static

## ◆ afp_dsi_die()

void afp_dsi_die | ( | int | sig | ) |
| static

## ◆ afp_dsi_getmesg()

void afp_dsi_getmesg | ( | int | sig | ) |
| static

## ◆ afp_dsi_reload()

void afp_dsi_reload | ( | int | sig | ) |
| static

## ◆ afp_dsi_timedown()

void afp_dsi_timedown | ( | int | sig | ) |
| static

## ◆ afp_dsi_transfer_session()

void afp_dsi_transfer_session | ( | int | sig | ) |
| static

## ◆ afp_over_dsi()

void afp_over_dsi | ( | AFPObj * | obj | ) |

## ◆ afp_over_dsi_sighandlers()

void afp_over_dsi_sighandlers | ( | AFPObj * | obj | ) |

## ◆ alarm_handler()

void alarm_handler | ( | int | sig | ) |
| static

## ◆ child_handler()

void child_handler | ( | int | sig | ) |
| static

## ◆ pending_request()

void pending_request | ( | DSI * | dsi | ) |
| static

## Variable Documentation

## ◆ AFPobj

AFPObj* AFPobj = NULL

We generally pass this from afp_over_dsi to all afp_* funcs, so it should already be available everywhere. Unfortunately some funcs (eg acltoownermode) need acces to it but are deeply nested in the function chain with the caller already without acces to it. Changing this would require adding a reference to the caller which itself might be called in many places (eg acltoownermode is called from accessmode). The only sane way out is providing a copy of it here:

## ◆ debug_request

volatile sig_atomic_t debug_request = 0
| static

## ◆ recon_jmp

sigjmp_buf recon_jmp
| static

## ◆ reload_request

volatile int reload_request = 0

## ◆ replaycache

rc_elem_t replaycache[REPLAYCACHE_SIZE]
| static

AFP replay cache:

- fix sized array
- indexed just by taking DSIreqID mod REPLAYCACHE_SIZE