1 | /* |
---|
2 | * $Id$ |
---|
3 | */ |
---|
4 | |
---|
5 | /* |
---|
6 | * Trivial File Transfer Protocol (TFTP) |
---|
7 | * |
---|
8 | * Transfer file to/from remote host |
---|
9 | * |
---|
10 | * W. Eric Norum |
---|
11 | * Saskatchewan Accelerator Laboratory |
---|
12 | * University of Saskatchewan |
---|
13 | * Saskatoon, Saskatchewan, CANADA |
---|
14 | * eric@skatter.usask.ca |
---|
15 | */ |
---|
16 | |
---|
17 | /* |
---|
18 | * Usage: |
---|
19 | * |
---|
20 | * To open `/bootfiles/image' on `hostname' for reading: |
---|
21 | * fd = open ("/TFTP/hostname/bootfiles/image", O_RDONLY); |
---|
22 | * |
---|
23 | * The `hostname' must be four dot-separated decimal values. |
---|
24 | * |
---|
25 | * To open a file on the host which supplied the BOOTP |
---|
26 | * information just leave the `hostname' part empty: |
---|
27 | * fd = open ("/TFTP//bootfiles/image", O_RDONLY); |
---|
28 | * |
---|
29 | */ |
---|
30 | |
---|
31 | #ifndef _TFTP_DRIVER_h |
---|
32 | #define _TFTP_DRIVER_h |
---|
33 | |
---|
34 | #ifdef __cplusplus |
---|
35 | extern "C" { |
---|
36 | #endif |
---|
37 | |
---|
38 | /* |
---|
39 | * Driver entry points |
---|
40 | */ |
---|
41 | #define TFTP_DRIVER_TABLE_ENTRY \ |
---|
42 | { rtems_tftp_initialize, rtems_tftp_open, rtems_tftp_close, \ |
---|
43 | rtems_tftp_read, rtems_tftp_write, rtems_tftp_control } |
---|
44 | |
---|
45 | rtems_device_driver rtems_tftp_initialize( |
---|
46 | rtems_device_major_number, |
---|
47 | rtems_device_minor_number, |
---|
48 | void * |
---|
49 | ); |
---|
50 | |
---|
51 | rtems_device_driver rtems_tftp_open( |
---|
52 | rtems_device_major_number, |
---|
53 | rtems_device_minor_number, |
---|
54 | void * |
---|
55 | ); |
---|
56 | |
---|
57 | rtems_device_driver rtems_tftp_close( |
---|
58 | rtems_device_major_number, |
---|
59 | rtems_device_minor_number, |
---|
60 | void * |
---|
61 | ); |
---|
62 | |
---|
63 | rtems_device_driver rtems_tftp_read( |
---|
64 | rtems_device_major_number, |
---|
65 | rtems_device_minor_number, |
---|
66 | void * |
---|
67 | ); |
---|
68 | |
---|
69 | rtems_device_driver rtems_tftp_write( |
---|
70 | rtems_device_major_number, |
---|
71 | rtems_device_minor_number, |
---|
72 | void * |
---|
73 | ); |
---|
74 | |
---|
75 | rtems_device_driver rtems_tftp_control( |
---|
76 | rtems_device_major_number, |
---|
77 | rtems_device_minor_number, |
---|
78 | void * |
---|
79 | ); |
---|
80 | |
---|
81 | #ifdef __cplusplus |
---|
82 | } |
---|
83 | #endif |
---|
84 | |
---|
85 | #endif |
---|