netatalk: status.c File Reference

netatalk 4.5.0
Free and Open Source Apple Filing Protocol (AFP) Server
Loading...
Searching...
No Matches
status.c File Reference
`#include <arpa/inet.h>`
`#include <ctype.h>`
`#include <fcntl.h>`
`#include <stdbool.h>`
`#include <stdio.h>`
`#include <stdlib.h>`
`#include <string.h>`
`#include <sys/socket.h>`
`#include <sys/stat.h>`
`#include <sys/types.h>`
`#include <time.h>`
`#include <unistd.h>`
`#include <atalk/dsi.h>`
`#include <atalk/atp.h>`
`#include <atalk/asp.h>`
`#include <atalk/globals.h>`
`#include <atalk/logger.h>`
`#include <atalk/unicode.h>`
`#include <atalk/util.h>`
`#include "afp_config.h"`
`#include "icon.h"`
`#include "status.h"`
`#include "uam_auth.h"`

## Functions
static int | uam_gss_enabled (void)
static void | status_flags (char *data, const int notif, const int ipok, const unsigned char passwdbits, const int dirsrvcs, int flags)
static int | status_server (char *data, const char *server, const struct afp_options *options)
static void | status_machine (char *data)
static uint16_t | status_signature (char *data, int *servoffset, const struct afp_options *options)
static size_t | status_netaddress (char *data, int *servoffset, const ASP asp, const DSI *dsi, const struct afp_options *options)
static size_t | status_directorynames (char *data, int *diroffset, const DSI *dsi, const struct afp_options *options)
| Build the DirectoryNames field of the status reply.
static size_t | status_utf8servername (char *data, int *nameoffset, const DSI *dsi, const struct afp_options *options)
static void | status_icon (char *data, const unsigned char *icondata, const size_t iconlen, const int sigoffset)
void | status_init (AFPObj *dsi_obj, AFPObj *asp_obj, DSI *dsi)
void | set_signature (struct afp_options *options)
| Set the server signature.
int | afp_getsrvrinfo (AFPObj *obj, char *ibuf, size_t ibuflen, char *rbuf, size_t *rbuflen)

## Variables
static size_t | maxstatuslen = 0

## Function Documentation

## ◆ afp_getsrvrinfo()

int afp_getsrvrinfo | ( | AFPObj * | obj,
|  | char * | ibuf,
|  | size_t | ibuflen,
|  | char * | rbuf,
|  | size_t * | rbuflen )

## ◆ set_signature()

void set_signature | ( | struct afp_options * | options | ) |

Set the server signature.

- If found in conf file, use it.
- If not found in conf file, genarate and append in conf file.
- If conf file don't exist, create and genarate.
- If cannot open conf file, use one-time signature.
- If signature = xxxxx, use it.

## ◆ status_directorynames()

size_t status_directorynames | ( | char * | data,
|  | int * | diroffset,
|  | const DSI * | dsi,
|  | const struct afp_options * | options )
| static

Build the DirectoryNames field of the status reply.

DirectoryNamesCount offset: uint16_t
...
DirectoryNamesCount: uint8_t
DirectoryNames: list of UTF-8 Pascal strings (uint8_t + char[1,255])
list
Definition etc/atalkd/list.h:6

## ◆ status_flags()

void status_flags | ( | char * | data,
|  | const int | notif,
|  | const int | ipok,
|  | const unsigned char | passwdbits,
|  | const int | dirsrvcs,
|  | int | flags )
| static

## ◆ status_icon()

void status_icon | ( | char * | data,
|  | const unsigned char * | icondata,
|  | const size_t | iconlen,
|  | const int | sigoffset )
| static

## ◆ status_init()

void status_init | ( | AFPObj * | dsi_obj,
|  | AFPObj * | asp_obj,
|  | DSI * | dsi )

## ◆ status_machine()

void status_machine | ( | char * | data | ) |
| static

## ◆ status_netaddress()

size_t status_netaddress | ( | char * | data,
|  | int * | servoffset,
|  | const ASP | asp,
|  | const DSI * | dsi,
|  | const struct afp_options * | options )
| static

## ◆ status_server()

int status_server | ( | char * | data,
|  | const char * | server,
|  | const struct afp_options * | options )
| static

## ◆ status_signature()

uint16_t status_signature | ( | char * | data,
|  | int * | servoffset,
|  | const struct afp_options * | options )
| static

## ◆ status_utf8servername()

size_t status_utf8servername | ( | char * | data,
|  | int * | nameoffset,
|  | const DSI * | dsi,
|  | const struct afp_options * | options )
| static

## ◆ uam_gss_enabled()

int uam_gss_enabled | ( | void |  | ) |
| static

## Variable Documentation

## ◆ maxstatuslen

size_t maxstatuslen = 0
| static