/* * VAS_EBOOT -- GRand Unified Bootloader * Copyright (C) 2010,2011 Free Software Foundation, Inc. * * VAS_EBOOT 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 3 of the License, or * (at your option) any later version. * * VAS_EBOOT 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 VAS_EBOOT. If not, see . */ #ifndef VAS_EBOOT_NET_UDP_HEADER #define VAS_EBOOT_NET_UDP_HEADER 1 #include #include struct udphdr { VasEBoot_uint16_t src; VasEBoot_uint16_t dst; VasEBoot_uint16_t len; VasEBoot_uint16_t chksum; } VAS_EBOOT_PACKED; struct VasEBoot_net_udp_socket; typedef struct VasEBoot_net_udp_socket *VasEBoot_net_udp_socket_t; VasEBoot_net_udp_socket_t VasEBoot_net_udp_open (VasEBoot_net_network_level_address_t addr, VasEBoot_uint16_t out_port, VasEBoot_err_t (*recv_hook) (VasEBoot_net_udp_socket_t sock, struct VasEBoot_net_buff *nb, void *data), void *recv_hook_data); void VasEBoot_net_udp_close (VasEBoot_net_udp_socket_t sock); VasEBoot_err_t VasEBoot_net_send_udp_packet (const VasEBoot_net_udp_socket_t socket, struct VasEBoot_net_buff *nb); #endif