netatalk 4.4.3
Free and Open Source Apple Filing Protocol (AFP) Server
Loading...
Searching...
No Matches
afp_config.c File Reference
`#include <arpa/inet.h>`
`#include <ctype.h>`
`#include <errno.h>`
`#include <limits.h>`
`#include <netinet/in.h>`
`#include <stdio.h>`
`#include <stdlib.h>`
`#include <string.h>`
`#include <sys/socket.h>`
`#include <unistd.h>`
`#include <atalk/afp.h>`
`#include <atalk/compat.h>`
`#include <atalk/dsi.h>`
`#include <atalk/atp.h>`
`#include <atalk/asp.h>`
`#include <atalk/errchk.h>`
`#include <atalk/fce_api.h>`
`#include <atalk/globals.h>`
`#include <atalk/nbp.h>`
`#include <atalk/zip.h>`
`#include <atalk/ldapconfig.h>`
`#include <atalk/iniparser_util.h>`
`#include <atalk/logger.h>`
`#include <atalk/netatalk_conf.h>`
`#include <atalk/server_child.h>`
`#include <atalk/util.h>`
`#include "afp_config.h"`
`#include "uam_auth.h"`
`#include "status.h"`
`#include "volume.h"`
`#include "dircache.h"`

## Functions
static int | safe_atoi (const char *str, const char *param_name, int min_val, int max_val, int default_val)
| Safe string to integer conversion with bounds checking.
void | configfree (AFPObj *obj, DSI *dsi)
| Free and cleanup config and DSI.
int | configinit (AFPObj *dsi_obj, AFPObj *asp_obj)
| Get everything running.

## Function Documentation

## ◆ configfree()

void configfree | ( | AFPObj * | obj,
|  | DSI * | dsi )

Free and cleanup config and DSI.

"dsi" can be NULL in which case all DSI objects and the config object is freed, otherwise its an afpd session child and only any unneeded DSI objects are freed

## ◆ configinit()

int configinit | ( | AFPObj * | dsi_obj,
|  | AFPObj * | asp_obj )

Get everything running.

## ◆ safe_atoi()

int safe_atoi | ( | const char * | str,
|  | const char * | param_name,
|  | int | min_val,
|  | int | max_val,
|  | int | default_val )
| static

Safe string to integer conversion with bounds checking.

Parameters

  str | String to convert
  param_name | Parameter name for error messages
  min_val | Minimum allowed value
  max_val | Maximum allowed value
  default_val | Default value to return on error

Returns
  Converted integer value or default_val on error