summaryrefslogtreecommitdiff
path: root/hurd/pfinet.defs
blob: 11a6e64d69a2d820c1897474d1490810d4aa0a6a (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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
/* Definitions for pfinet-specific calls
   Copyright (C) 1996 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>

INTR_INTERFACE

/* Add a route entry for DESTINATION through GATEWAY.  All outgoing IP
   addresses A for which (A & MASK) == DESTINATION will be directed
   through GATEWAY.  What BSD calls `host routes' are just where
   MASK is all one bits.  */
routine pfinet_add_route (
	socket_t ignored;
	int gateway;
	int destination;
	int mask);

/* Delete a route entry; the parameters much exactly match a preceding
   pfinet_add_route call. */
routine pfinet_delete_route (
	socket_t ignored;
	int gateway;
	int destination;
	int mask);

/* Return the current contents of the routing table.  GATEWAY,
   DESTINATION, MASK, REDIRECT, and WIRED are parallel arrays with one element
   each for each route.  GATEWAY, DESTINATION, and MASK refer to the
   parameters of the pfinet_add_route call.  REDIRECT is set for 
   internally generated routes.  WIRED is set for permanent routes
   associated with live interfaces. */
routine pfinet_get_routes (
	socket_t ignored;
	intarray_t gateway;
	intarray_t destination;
	intarray_t mask;
	data_t redirect;
	data_t wired);
   
/* Add a new interface specification.  NAME is the kernel device name
   corresponding to the interface.  ADDR is our address on that 
   interface.  DEST is the address of the peers we can talk to on the
   interface, such that if (X & MASK) == DEST for some address X,
   then it should be directly reachable on this interface. 
   A wired routing entry will be added for this interface.  */
routine pfinet_add_interface (
	socket_t ignored;
	string_t name;
   	int addr;
	int dest;
	int mask;
	int type);

/* Delete an interface specification.  The parameters must exactly
   match those of a preceding pfinet_add_interface call. */
routine pfinet_delete_interface (
	socket_t ignored;
	string_t name;
	int addr;
	int dest;
	int mask;
	int type);