Re: Detecting if kernel is ipv6 capable



Roy Smith wrote:
In article <1180053168.805795.94060@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
Tejas Kokje <binarysemaphore@xxxxxxxxx> wrote:

On May 24, 11:07 am, robert <robertlazar...@xxxxxxxxx> wrote:
Hi all,

I have an embedded system which we want to run some of the installed
application like dhcp and ssh over ipv6. Is there a simple way to
determine if the OS is ipv6 capable? We are tracking down the kernel
sources to do 'make menuconfig' - but thought I'd ask if there is a
way I can know for sure in just the shell.

Robert
Check for the /proc/net/if_inet6 file. If it exists, kernel is IPv6
capable. Contents of this file will tell you what layer 3 interfaces
on your system support IPv6. Of course, I am assuming that your
embedded system is running Linux :-).

Thanks

Tejas Kokje

I generally execute (i.e. in a C program).

struct in6_addr buf;
inet_pton(AF_INET6, "::", buf);

That will tell you if you have an IPv6 capable C library, not an IPv6 capable kernel!

Robert


if inet_pton() returns 0, you've got an IPv6 capable kernel. If course, just because your kernel can do IPv6 doesn't always mean the whole box is set up (i.e. addresses assigned, DNS configured, etc, etc).

But, you asked specifically about things you can do from the shell. In addition to the above, you might try "ping6 ::1".
.



Relevant Pages

  • Debugging a crash where user code pages are unexpectedly unmapped (v2.6.5)
    ... I'm working with kernel 2.6.5 on an ARM920 CPU. ... embedded system with 32MiB of RAM and root mounted over NFS. ... send the line "unsubscribe linux-kernel" in ...
    (Linux-Kernel)
  • Re: Damn you, FEDEX! or Nikon D40 lost in Springfield, MO blackhole.
    ... the 2 mp Mavica he had been using with a Nikon D40. ... After shopping around, he got me to order one for him. ... The shipper had it insured, but from what I have read it could take weeks to sort this crap out. ... You may get your insurance from FedEx and a couple weeks later they find it and deliver it. ...
    (alt.photography)
  • Behaviour of the VM on a embedded linux
    ... I'm trying to figure out whats going on an embedded system I have to deal with. ... The application runs a lot of pthreads on different real time priority levels. ... I'm not so familiar with the VM internas of the Linux kernel - I only have some general ideas about systems using MMUs. ...
    (Linux-Kernel)
  • Re: does anyone write a built-in kernel GUI in linux
    ... >> Process switch between X server and X client might cost much when ... >> drawing, especially in embedded system. ... >> Xfree86-4.5.0 version(primaryly using their drawing routines). ... >> to apply serveral sys call in kernel, and X lib call them to draw on ...
    (comp.os.linux.embedded)
  • Re: Possible Bootloader Optimization in inflate (get rid of unnecessary 32k Window)
    ... > On the other hand it makes the kernel a few bytes smaller :-) ... Well on rather slow machines it is a bit faster indeed, ... years ago for an embedded system. ... More majordomo info at http://vger.kernel.org/majordomo-info.html ...
    (Linux-Kernel)