Solved

Programmatically change DNS in VxWorks 6.6

Posted on 2010-09-13
2
1,565 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
ASP/VB email question 4 62
ejb entity bean example 2 35
Is it possible to debug a Store Procedure on MSSMS after a unitTest that calls it  from VS ? 4 48
Java array 10 61
In this post we will learn different types of Android Layout and some basics of an Android App.
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
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 …

749 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