Solved

Programmatically change DNS in VxWorks 6.6

Posted on 2010-09-13
2
1,544 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
find a node in VST 2 62
firstChar challenge 13 106
wordmultiple challenge 12 116
Q2. How to run DAX query from SSMS. I don’t see any DAX query type. 1 43
This article is meant to give a basic understanding of how to use R Sweave as a way to merge LaTeX and R code seamlessly into one presentable document.
Displaying an arrayList in a listView using the default adapter is rarely the best solution. To get full control of your display data, and to be able to refresh it after editing, requires the use of a custom adapter.
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 fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

947 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

21 Experts available now in Live!

Get 1:1 Help Now