tools/adflib: build only host variant which is used by Sam440 target
[AROS.git] / workbench / network / stacks / AROSTCP / bsdsocket / net / sana2request.h
blob8f47bb56bc2be14e523ff8afe08a96e210547d52
1 /*
2 * Copyright (C) 1993 AmiTCP/IP Group, <amitcp-group@hut.fi>
3 * Helsinki University of Technology, Finland.
4 * All rights reserved.
5 * Copyright (C) 2005 - 2007 The AROS Dev Team
7 * Includes changes (c) 2005 - 2006 Neil Cafferkey and Pavel Fedin
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation.
13 * This program is distributed in the hope that it will be useful, but
14 * WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place - Suite 330, Boston,
21 * MA 02111-1307, USA.
25 extern struct TagItem buffermanagement[];
27 #ifndef SYS_PARAM_H
28 #include <sys/param.h>
29 #endif
31 BOOL
32 ioip_alloc_mbuf(struct IOIPReq *s2rp, ULONG MTU);
35 * Allocate a new Sana-II IORequest for this task
37 static inline struct IOSana2Req *
38 CreateIOSana2Req(register struct sana_softc *ssc)
40 register struct IOSana2Req *req;
41 register struct MsgPort *port;
43 port = CreateMsgPort();
44 if (!port) return NULL;
46 req = CreateIORequest(port, sizeof(*req));
47 if (!req) {
48 DeleteMsgPort(port);
49 return NULL;
52 if (ssc) {
53 req->ios2_Req.io_Device = ssc->ss_dev;
54 req->ios2_Req.io_Unit = ssc->ss_unit;
55 req->ios2_BufferManagement = ssc->ss_bufmgnt;
57 aligned_bcopy(ssc->ss_hwaddr, req->ios2_SrcAddr, ssc->ss_if.if_addrlen);
59 return req;
63 * Delete a Sana-II IORequest
65 static inline VOID
66 DeleteIOSana2Req(register struct IOSana2Req *open)
68 register struct MsgPort *port = open->ios2_Req.io_Message.mn_ReplyPort;
70 DeleteIORequest((struct IORequest*) open);
71 if (port)
72 DeleteMsgPort(port);