2 * Copyright (C) 1993 AmiTCP/IP Group, <amitcp-group@hut.fi>
3 * Helsinki University of Technology, Finland.
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,
25 extern struct TagItem buffermanagement
[];
28 #include <sys/param.h>
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
));
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
);
63 * Delete a Sana-II IORequest
66 DeleteIOSana2Req(register struct IOSana2Req
*open
)
68 register struct MsgPort
*port
= open
->ios2_Req
.io_Message
.mn_ReplyPort
;
70 DeleteIORequest((struct IORequest
*) open
);