/*
* GRUB -- GRand Unified Bootloader
* Copyright (C) 2010,2011 Free Software Foundation, Inc.
*
* 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.
*
* GRUB 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 GRUB. If not, see <http://www.gnu.org/licenses/>.
*/
#include <grub/priority_queue.h>
struct iphdr {
grub_uint16_t ident;
} __attribute__ ((packed)) ;
enum
{
};
struct ip6hdr {
} __attribute__ ((packed)) ;
static int
{
/* We want the first elements to be on top. */
return +1;
return -1;
return 0;
}
struct reassemble
{
};
{
{
if (sum > 0xFFFF)
sum -= 0xFFFF;
}
if (len)
{
if (sum > 0xFFFF)
sum -= 0xFFFF;
}
if (sum >= 0xFFFF)
sum -= 0xFFFF;
}
static grub_err_t
const grub_net_network_level_address_t * target,
struct grub_net_buff * nb,
{
id++;
{
if (!nb2)
return grub_errno;
if (err)
return err;
if (err)
return err;
? 0 : MORE_FRAGMENTS));
if (err)
return err;
if (err)
return err;
if (err)
return err;
}
return GRUB_ERR_NONE;
}
static grub_err_t
struct grub_net_buff *nb,
{
}
static grub_err_t
struct grub_net_card *card,
const grub_net_network_level_address_t *dest,
{
int multicast = 0;
/* DHCP needs special treatment since we don't know IP yet. */
{
{
{
{
dest);
{
"Expected %x, got %x\n",
grub_be_to_cpu16 (chk));
return GRUB_ERR_NONE;
}
}
if (err)
return err;
return GRUB_ERR_NONE;
}
return GRUB_ERR_NONE;
}
}
{
break;
/* Solicited node multicast. */
& grub_be_to_cpu64_compile_time (0xffffff)))
>> 16) & 0xff)
>> 8) & 0xff)
>> 0) & 0xff))
{
multicast = 1;
break;
}
}
<< 48)
{
return GRUB_ERR_NONE;
}
if (multicast)
switch (proto)
{
case GRUB_NET_IP_UDP:
case GRUB_NET_IP_TCP:
case GRUB_NET_IP_ICMP:
case GRUB_NET_IP_ICMPV6:
default:
break;
}
return GRUB_ERR_NONE;
}
static void
{
{
grub_netbuff_free (*nb);
}
}
static void
free_old_fragments (void)
{
{
}
}
static grub_err_t
struct grub_net_card *card,
{
{
return GRUB_ERR_NONE;
}
{
return GRUB_ERR_NONE;
}
* sizeof (grub_uint32_t)))
{
return GRUB_ERR_NONE;
}
/* Check size. */
{
if (actual_size > expected_size)
{
if (err)
{
return err;
}
}
if (actual_size < expected_size)
{
return GRUB_ERR_NONE;
}
}
/* Unfragmented packet. Good. */
{
* sizeof (grub_uint32_t)));
if (err)
{
return err;
}
}
break;
if (!rsm)
{
if (!rsm)
return grub_errno;
reassembles = rsm;
prev = &reassembles;
{
return grub_errno;
}
rsm->asm_buffer = 0;
}
if (err)
return err;
{
if (!rsm->asm_buffer)
{
return grub_errno;
}
}
if (!rsm->asm_buffer)
return GRUB_ERR_NONE;
while (1)
{
if (!nb_top_p)
return GRUB_ERR_NONE;
* sizeof (grub_uint32_t)));
if (err)
{
return err;
}
& OFFSET_MASK))
return GRUB_ERR_NONE;
{
continue;
}
< copy)
& OFFSET_MASK);
& OFFSET_MASK)],
continue;
rsm->asm_buffer = 0;
if (!ret)
{
return grub_errno;
}
ttl);
}
return GRUB_ERR_NONE;
}
static grub_err_t
struct grub_net_buff *nb,
{
}
struct grub_net_buff *nb,
{
{
default:
}
}
static grub_err_t
struct grub_net_card *card,
{
{
return GRUB_ERR_NONE;
}
if (err)
{
return err;
}
/* Check size. */
{
if (actual_size > expected_size)
{
if (err)
{
return err;
}
}
if (actual_size < expected_size)
{
return GRUB_ERR_NONE;
}
}
}
struct grub_net_card *card,
{
return GRUB_ERR_NONE;
}