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#ifndef NO_DDP 17 18#include <sys/types.h> 19#include <sys/cdefs.h> 20#include <sys/socket.h> 21#include <netatalk/at.h> 22 23extern int netddp_open (struct sockaddr_at *, struct sockaddr_at *); 24 25#if !defined(NO_DDP) && defined(MACOSX_SERVER) 26extern int netddp_sendto (int, void *, size_t, unsigned int, 27 const struct sockaddr *, unsigned int); 28extern int netddp_recvfrom (int, void *, int, unsigned int, 29 struct sockaddr *, unsigned int *); 30#define netddp_close(a) ddp_close(a) 31#else 32#include <unistd.h> 33#include <sys/types.h> 34 35#define netddp_close(a) close(a) 36#define netddp_sendto sendto 37#define netddp_recvfrom recvfrom 38#endif 39 40#endif /* NO_DDP */ 41#endif /* netddp.h */ 42 43