summaryrefslogtreecommitdiffstats
path: root/c/src/exec/libnetworking/rtems/tftp.h
blob: d09782e22b7c9272b97a7d6d61f5206d4df8ac34 (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
83
84
85
/*
 *  $Id$
 */

/*
 * Trivial File Transfer Protocol (TFTP)
 *
 * Transfer file to/from remote host
 *
 * W. Eric Norum
 * Saskatchewan Accelerator Laboratory
 * University of Saskatchewan
 * Saskatoon, Saskatchewan, CANADA
 * eric@skatter.usask.ca
 */

/*
 * Usage:
 * 
 * To open `/bootfiles/image' on `hostname' for reading:
 *         fd = open ("/TFTP/hostname/bootfiles/image", O_RDONLY);
 *
 * The `hostname' must be four dot-separated decimal values.
 *
 * To open a file on the host which supplied the BOOTP
 * information just leave the `hostname' part empty:
 *         fd = open ("/TFTP//bootfiles/image", O_RDONLY);
 *
 */

#ifndef _TFTP_DRIVER_h
#define _TFTP_DRIVER_h

#ifdef __cplusplus
extern "C" {
#endif

/*
 * Driver entry points
 */
#define TFTP_DRIVER_TABLE_ENTRY \
  { rtems_tftp_initialize, rtems_tftp_open, rtems_tftp_close, \
    rtems_tftp_read, rtems_tftp_write, rtems_tftp_control }

rtems_device_driver rtems_tftp_initialize(
  rtems_device_major_number,
  rtems_device_minor_number,
  void *
);

rtems_device_driver rtems_tftp_open(
  rtems_device_major_number,
  rtems_device_minor_number,
  void *
);

rtems_device_driver rtems_tftp_close(
  rtems_device_major_number,
  rtems_device_minor_number,
  void *
);

rtems_device_driver rtems_tftp_read(
  rtems_device_major_number,
  rtems_device_minor_number,
  void *
);

rtems_device_driver rtems_tftp_write(
  rtems_device_major_number,
  rtems_device_minor_number,
  void *
);

rtems_device_driver rtems_tftp_control(
  rtems_device_major_number,
  rtems_device_minor_number,
  void *
);

#ifdef __cplusplus
}
#endif

#endif