/*
**************************************************************************
*
* Boot-ROM-Code to load an operating system across a TCP/IP network.
*
* Module: pxe/udp.h
* Purpose: Definitions for UDP API services
* Entries: None
*
**************************************************************************
*
* Copyright (C) 1998-2003 Gero Kuhlmann <gero@gkminix.han.de>
*
* This program 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 of the License, or
* any later version.
*
* This program 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 this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
* $Id: udp.h,v 1.5 2003/01/25 23:29:40 gkminix Exp $
*/
#ifndef _PXE_UDP_H
#define _PXE_UDP_H
/*
**************************************************************************
*
* This file contains the UDP API definitions as per Intels PXE
* specification version 1.0.
*
**************************************************************************
*
* UDP opcodes:
*/
#define UDP_OPEN 0x0030
#define UDP_CLOSE 0x0031
#define UDP_READ 0x0032
#define UDP_WRITE 0x0033
#define UDP_MINNUM 0x0030
#define UDP_MAXNUM 0x0033
/*
**************************************************************************
*
* Definition of structure for UDP_OPEN function:
*/
#ifndef _USE_ASSEMBLER
typedef struct s_udp_open {
unsigned int status; /* Out: function status */
unsigned long src_ip; /* In: IP address of this station */
} t_udp_open;
#else
o_udpo_status equ $0000 ! Out: status
o_udpo_src_ip equ $0002 ! In: IP address of this station
udp_open_size equ $0006 ! size of function structure
#endif /* _USE_ASSEMBLER */
/*
**************************************************************************
*
* Definition of structure for UDP_CLOSE function:
*/
#ifndef _USE_ASSEMBLER
typedef struct s_udp_close {
unsigned int status; /* Out: function status */
} t_udp_close;
#else
o_udpc_status equ $0000 ! Out: status
udp_close_size equ $0002 ! size of function structure
#endif /* _USE_ASSEMBLER */
/*
**************************************************************************
*
* Definition of structure for UDP_READ function:
*/
#ifndef _USE_ASSEMBLER
typedef struct s_udp_read {
unsigned int status; /* Out: function status */
unsigned long src_ip; /* Out: IP address of sender */
unsigned long dest_ip; /* In: receive IP address */
unsigned int s_port; /* Out: UDP source port of sender */
unsigned int d_port; /* In: receive UDP port */
unsigned int bufsize; /* In/Out: size of receive buffer */
unsigned int bufofs; /* In: far pointer to receive buffer */
unsigned int bufseg;
} t_udp_read;
#else
o_udpr_status equ $0000 ! Out: status
o_udpr_src_ip equ $0002 ! Out: IP address of sender
o_udpr_dest_ip equ $0006 ! In: receive IP address
o_udpr_s_port equ $000A ! Out: UDP source port of sender
o_udpr_d_port equ $000C ! In: receive UDP port
o_udpr_bufsize equ $000E ! In/Out: size of receive buffer
o_udpr_buffer equ $0010 ! In: far pointer to receive buffer
udp_read_size equ $0014 ! size of function structure
#endif /* _USE_ASSEMBLER */
/*
**************************************************************************
*
* Definition of structure for UDP_WRITE function:
*/
#ifndef _USE_ASSEMBLER
#define PXE_UDP_DEF_PORT 2069 /* Default source port */
typedef struct s_udp_write {
unsigned int status; /* Out: function status */
unsigned long ip; /* In: destination IP address */
unsigned long gw; /* In: gateway IP address */
unsigned int src_port; /* In: source UDP port */
unsigned int dest_port; /* In: destination UDP port */
unsigned int bufsize; /* In: size of send buffer */
unsigned int bufofs; /* In: far pointer to send buffer */
unsigned int bufseg;
} t_udp_write;
#else
o_udpw_status equ $0000 ! Out: status
o_udpw_ip equ $0002 ! In: destination IP address
o_udpw_gw equ $0006 ! In: gateway IP address
o_udpw_src_port equ $000A ! In: source UDP port
o_udpw_dest_port equ $000C ! In: destination UDP port
o_udpw_bufsize equ $000E ! In: size of send buffer
o_udpw_buffer equ $0010 ! In: far pointer to send buffer
udp_write_size equ $0014 ! size of function structure
#endif /* _USE_ASSEMBLER */
#endif /* _PXE_UDP_H */
syntax highlighted by Code2HTML, v. 0.9.1