<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body bgcolor="#ffffff" text="#000000">
<p><font face="Verdana"><small>HI all,</small></font></p>
<p><font face="Verdana"><small>I am writing simple dhcpv6 client. I
gone through the rfc of dhcp and ipv6 and understand basic.
With the understanding i started to implement SOLICIT request
option. <br>
I have created a packet with the below structure.</small></font></p>
<p><font face="Verdana"><small>struct udp_dhcp6_packet {</small></font></p>
<p><font face="Verdana"><small> struct ip6_hdr ip;</small></font></p>
<p><font face="Verdana"><small> struct udphdr udp;</small></font></p>
<p><font face="Verdana"><small> struct dhcp6_Message data; </small></font></p>
<p><font face="Verdana"><small>} PACKED;</small></font></p>
<p><font face="Verdana"><small>In the above structure i am able to
assign the value for udp and data(i.e struct udphdr, struct
dhcp6_Message). But i could not able to set the value for ip.
Below is the structure of ip6_hdr.</small></font></p>
<p><font face="Verdana"><small>struct ip6_hdr<br>
{ <br>
union {<br>
</small></font></p>
<font face="Verdana"><small> struct ip6_hdrctl</small></font><br>
<font face="Verdana"><small> {</small></font><br>
<font face="Verdana"><small> uint32_t ip6_un1_flow; /*
4 bits version, 8 bits TC,</small></font><br>
<font face="Verdana"><small>
20 bits flow-ID */</small></font><br>
<font face="Verdana"><small> uint16_t ip6_un1_plen; /*
payload length */</small></font><br>
<font face="Verdana"><small> uint8_t ip6_un1_nxt; /*
next header */</small></font><br>
<font face="Verdana"><small> uint8_t ip6_un1_hlim; /*
hop limit */</small></font><br>
<font face="Verdana"><small> } ip6_un1;</small></font><br>
<font face="Verdana"><small> uint8_t ip6_un2_vfc; /* 4
bits version, top 4 bits tclass */</small></font><br>
<font face="Verdana"><small> } ip6_ctlun;</small></font><br>
<font face="Verdana"><small> struct in6_addr ip6_src; /*
source address */</small></font><br>
<font face="Verdana"><small> struct in6_addr ip6_dst; /*
destination address */</small></font><br>
<font face="Verdana"><small> };</small></font>
<p><font face="Verdana"><small>I want to set the ip6_dst value as
ff02::1:2 and the ip6_src address as fe80::220:4aff:fea8:8e4a
and remaining options. But i dont have any idea how to set
these values. I googled many times and not able to get the
idea to creat ipv6 header. </small></font></p>
<p><font face="Verdana"><small>Kindly help me to solve my problem?</small></font></p>
<p><font face="Verdana"><small>Note :</small></font></p>
<p><font face="Verdana"><small>I don't know whether this is right
place to ask this question . If i am wrong , i am sorry.</small></font></p>
<p><font face="Verdana"><small>Thanks in advance ,<br>
</small></font></p>
<p><font face="Verdana"><small><br>
Prabhu</small></font></p>
</body>
</html>