netatalk  4.4.0dev
Free and Open Source Apple Filing Protocol (AFP) Server
Loading...
Searching...
No Matches
netddp.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 1999 Adrian Sun ([email protected])
3 * All Rights Reserved. See COPYRIGHT.
4 *
5 * this provides a generic interface to the ddp layer. with this, we
6 * should be able to interact with any appletalk stack that allows
7 * direct access to the ddp layer. right now, only os x server's ddp
8 * layer and the generic socket based interfaces are understood.
9 */
10
11#ifndef _ATALK_NETDDP_H
12#define _ATALK_NETDDP_H 1
13
14#ifndef NO_DDP
15
16#include <sys/types.h>
17#include <sys/socket.h>
18#include <unistd.h>
19
20#include <netatalk/at.h>
21
22extern int netddp_open(struct sockaddr_at *, struct sockaddr_at *);
23
24static inline int netddp_close(int filedes)
25{
26 return close(filedes);
27}
28
29static inline ssize_t netddp_sendto(int s, const void *msg, size_t len,
30 int flags, const struct sockaddr *to, socklen_t tolen)
31{
32 return sendto(s, msg, len, flags, to, tolen);
33}
34
35static inline ssize_t netddp_recvfrom(int s, void *buf, size_t len,
36 int flags, struct sockaddr *from,
37 socklen_t *fromlen)
38{
39 return recvfrom(s, buf, len, flags, from, fromlen);
40}
41
42#endif /* NO_DDP */
43#endif /* netddp.h */
44
static char buf[MAXPATHLEN+1]
Definition afppasswd.c:66
static dbd_flags_t flags
Definition cmd_dbd.c:45
PATH_T to
Definition nad_cp.c:86
static int netddp_close(int filedes)
Definition netddp.h:24
static ssize_t netddp_recvfrom(int s, void *buf, size_t len, int flags, struct sockaddr *from, socklen_t *fromlen)
Definition netddp.h:35
int netddp_open(struct sockaddr_at *, struct sockaddr_at *)
Definition netddp_open.c:22
static ssize_t netddp_sendto(int s, const void *msg, size_t len, int flags, const struct sockaddr *to, socklen_t tolen)
Definition netddp.h:29
Definition at.h:88