# Using ip6_pktopts in kernel



## perleo (Feb 9, 2011)

I'm looking to create an IPv6 extension header within the kernel (don't worry, this is just on a test bed). 

In the netinet6/ip6_output.c, ip6_output() I've noticed it takes an argument for ip6_pktopts pointed to opts. It continues on to check for a value in opt and if so it creates the ext header.

Anyway, I way should I be able to create my extension header here? I'm a little confused as to what approach to take, can I use the inet6_opt_init, append, finish and set_val functions here or are they too 'high level'. I want to create a destination options header.

Any advice taken, thanks.


----------

