Solved

Programmatically change DNS in VxWorks 6.6

Posted on 2010-09-13
2
1,541 Views
Last Modified: 2012-06-21
I am wondering if it's possible to programatically change the DNS settings in VxWorks 6.6.  

each location we run our system will need to have a different suffix and it would be a nightmare to have to make different builds just to satisfy the dns requirements.  any help would be greatly appreciated
0
Comment
Question by:lungsponge121
2 Comments
 
LVL 22

Expert Comment

by:cookre
ID: 33794021
0
 

Accepted Solution

by:
lungsponge121 earned 0 total points
ID: 33798866
For anybody else who runs into this problem / needs a solution

you can use the following commands to get & set the DNS address in vxworks 6.6 - i don't know if this will work for future versions, and in old versions you need to grab the extern variable arpt_keep

here's how to do it in version 6.6




#define IP_PORT_VXWORKS 66
#include <vxworks.h>
#include <ipcom_sysvar.h>

...

// get the current name

const char* current_domain_name = ipcom_sysvar_get("ipdnsc.domainname", IP_NULL, IP_NULL);

...

// set the new name
if (ipcom_sysvar_set("ipdnsc.domainname", domain_name, 0x1 ) != 0)
  {
    return -1;	  
  }
return 0;

Open in new window

0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Suggested Solutions

RIA (Rich Internet Application) tools are interactive internet applications which have many of the characteristics of desktop applications. The RIA tools typically deliver output either by the way of a site-specific browser or via browser plug-in. T…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now