?
Solved

Programmatically change DNS in VxWorks 6.6

Posted on 2010-09-13
2
Medium Priority
?
1,594 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Whether you’re a college noob or a soon-to-be pro, these tips are sure to help you in your journey to becoming a programming ninja and stand out from the crowd.
In this post we will learn different types of Android Layout and some basics of an Android App.
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 …
Simple Linear Regression

764 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