/*
* 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/>.
*/
struct icmp_header
{
} __attribute__ ((packed));
struct ping_header
{
} __attribute__ ((packed));
struct router_adv
{
} __attribute__ ((packed));
struct option_header
{
} __attribute__ ((packed));
struct prefix_option
{
} __attribute__ ((packed));
struct neighbour_solicit
{
} __attribute__ ((packed));
struct neighbour_advertise
{
} __attribute__ ((packed));
enum
{
};
enum
{
};
enum
{
};
enum
{
};
struct grub_net_card *card,
struct grub_net_network_level_interface *inf,
const grub_net_link_level_address_t *ll_src,
const grub_net_network_level_address_t *dest,
{
{
return GRUB_ERR_NONE;
}
dest))
{
dest));
return GRUB_ERR_NONE;
}
if (err)
{
return err;
}
{
case ICMP6_ECHO:
/* Don't accept multicast pings. */
if (!inf)
break;
{
break;
if (!nb_reply)
{
return grub_errno;
}
if (err)
goto ping_fail;
if (err)
goto ping_fail;
if (err)
goto ping_fail;
source);
return err;
}
case ICMP6_NEIGHBOUR_SOLICIT:
{
break;
if (ttl != 0xff)
break;
if (err)
{
return err;
}
{
{
return GRUB_ERR_NONE;
}
{
}
}
{
break;
}
if (!inf)
break;
+ sizeof (struct option_header)
+ 6
+ sizeof (struct icmp_header)
if (!nb_reply)
{
return grub_errno;
}
sizeof (struct neighbour_advertise)
+ sizeof (struct option_header)
+ 6
+ sizeof (struct icmp_header)
if (err)
goto ndp_fail;
if (err)
goto ndp_fail;
if (err)
goto ndp_fail;
if (err)
goto ndp_fail;
| FLAG_OVERRIDE);
if (err)
goto ndp_fail;
source);
return err;
}
{
break;
if (ttl != 0xff)
break;
if (err)
{
return err;
}
{
{
return GRUB_ERR_NONE;
}
{
}
}
break;
}
case ICMP6_ROUTER_ADVERTISE:
{
break;
if (err)
{
return err;
}
{
{
return GRUB_ERR_NONE;
}
{
}
{
{
continue;
}
{
continue;
{
break;
}
/* Update lease time if needed here once we have
lease times. */
if (inf)
continue;
{
+ sizeof (":XXXXXXXXXXXXXXXXXXXX")];
}
}
}
}
break;
}
};
return GRUB_ERR_NONE;
}
{
int i;
& grub_be_to_cpu64_compile_time (0xffffff)));
if (err)
return err;
+ sizeof (struct option_header)
+ 6
+ sizeof (struct icmp_header)
if (!nb)
return grub_errno;
sizeof (struct neighbour_solicit)
+ sizeof (struct option_header)
+ 6
+ sizeof (struct icmp_header)
if (err)
goto fail;
if (err)
goto fail;
if (err)
goto fail;
if (err)
goto fail;
&multicast);
if (err)
goto fail;
for (i = 0; i < GRUB_NET_TRIES; i++)
{
break;
break;
if (err)
break;
}
fail:
return err;
}