summaryrefslogtreecommitdiff
path: root/hurd/pfinet.defs
blob: abaf14d858d76041001e18ab92a67f6bdf50a337 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
/* Definitions for pfinet-specific calls
   Copyright (C) 1999 Free Software Foundation

This file is part of the GNU Hurd.

The GNU Hurd is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.

The GNU Hurd is distributed in the hope that it will be useful, 
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with the GNU Hurd; see the file COPYING.  If not, write to
the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */

subsystem pfinet 21000;

#include <hurd/hurd_types.defs>

#ifdef SOCKET_IMPORTS
SOCKET_IMPORTS
#endif

INTR_INTERFACE


/* Register a new interface.  This call is made on the main socket
   rendezvous port (/servers/socket/pfinet). */
routine pfinet_register_interface (
	server: pf_t;
	name: string_t;
	address: int;	/* in net byte order */
	network: int;	/* in net byte order */
	mask: int;	/* in net byte order */
	broadcast: int; /* in net byte order */
	mac_hdr_len: int;
	xmit: mach_port_send_t;
	out recv: mach_port_send_t);

/* Process an incoming packet.  This is made on the RECVXMIT port returned
   by a previous call to pfinet_register_interface. */
simpleroutine pfinet_recv (
	rx: mach_port_t;
	packet: data_t);

/* Sent by pfinet TO an interface for each packet that needs to be sent.
   The first mac_hdr_len bytes of the buffer are unfilled; the actual
   IP packet begins that many bytes in. */
simpleroutine pfinet_xmit (
	tx: mach_port_t;
	is_broadcast: int;
	packet: data_t);