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
Solved

Programmatically change DNS in VxWorks 6.6

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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

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

Suggested Solutions

Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.

840 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