]> arthur.barton.de Git - netatalk.git/blob - include/atalk/netddp.h
Merge symlink branch
[netatalk.git] / include / atalk / netddp.h
1 /*
2  * $Id: netddp.h,v 1.4 2009-10-13 22:55:37 didg Exp $
3  *
4  * Copyright (c) 1999 Adrian Sun (asun@zoology.washington.edu)
5  * All Rights Reserved. See COPYRIGHT.
6  *
7  * this provides a generic interface to the ddp layer. with this, we
8  * should be able to interact with any appletalk stack that allows
9  * direct access to the ddp layer. right now, only os x server's ddp
10  * layer and the generic socket based interfaces are understood.  
11  */
12
13 #ifndef _ATALK_NETDDP_H
14 #define _ATALK_NETDDP_H 1
15
16 #include <sys/types.h>
17 #include <sys/cdefs.h>
18 #include <sys/socket.h>
19 #include <netatalk/at.h>
20
21 extern int netddp_open   (struct sockaddr_at *, struct sockaddr_at *);
22
23 #if !defined(NO_DDP) && defined(MACOSX_SERVER)
24 extern int netddp_sendto (int, void *, size_t, unsigned int, 
25                            const struct sockaddr *, unsigned int);
26 extern int netddp_recvfrom (int, void *, int, unsigned int, 
27                              struct sockaddr *, unsigned int *);
28 #define netddp_close(a)  ddp_close(a)
29 #else
30 #include <unistd.h>
31 #include <sys/types.h>
32
33 #define netddp_close(a)  close(a)
34 #define netddp_sendto    sendto
35 #define netddp_recvfrom  recvfrom
36 #endif
37
38 #endif /* netddp.h */
39