How to set the IP and MAC address in C program?

My working environment is Sun250 Server, Solaris 7 operating system. I encountered a problem ---- How to set the IP and MAC address in C program to make the system change it IP & MAC at runtime?
Any idea is welcome! Thanks!

Hi
As a simplest possible solution, you can use the system command
to run ifconfig that can set both the mac address and the IP address of the system. You will have to use setuid though.
Or you can use the DLPI calls ( do a man DLPI or search for a
Sun documentation on the same at http://soldc.sun.com) to write
a pure C program.
HTH
Shridhar

Similar Messages

  • How to set the WIDTH and ALIGN of h:column in h:dataTable ??

    How to set the WIDTH and ALIGN of <h:column> in <h:dataTable>??
    Thanks a lot!

    Hi,thanks to your reply.
    Now I find a more convenient appraoch to set column's width and align respectively:
    <h:dataTable ...>
    <h:column>
    <f:facet name='header'>
    </f:facet>
    <h:outputText style="width:80px; text-align: right;" value='#{row.fieldA}'/>
    </h:column>
    <h:column>
    <f:facet name='header'>
    </f:facet>
    <h:outputText style="width:120px; text-align: left;" value='#{row.fieldB}'/>
    </h:column>
    </h:dataTable>
    It works fine.
    ^-^

  • How to set the router and play the Command & Conquer using direct IP mode?

    My router is WRT54GFirmware Version: v3.03.1
    How to set the router and play the Command & Conquer using direct IP mode with other computer?

    Hi, when you say direct IP mode, what do you mean ? do you wanna play the game online or on the LAN ??
    can you give a few more details.

  • How to set the gain and input coupling for each channel on a NI 4462 DaQ card?

    I've seen a few examples in how to set the gain for NI 4462, but none tell me how to chose the channel I wish to set this gain.  Also the same problem with input coupling
    Does anyone know how to set the gain and input coupling for each individual channel?
    Thanks,
    Hector
    LabView 8.5 Windows XP

    Hey Hector,
    http://forums.ni.com/ni/board/message?board.id=100&thread.id=1688
    This has a few examples of how to do that.  Let me know if you have further questions.
    Have fun!
    -gaving

  • How to set the Mail and Fax options  for the Smartforms ???

    How to set the Mail and Fax options  for the Smartforms ??? Please reply me very soon. Its a life deciding question now for me. Please .

    >
    veera Karthik wrote:
    > How to set the Mail and Fax options  for the Smartforms ??? Please reply me very soon. Its a life deciding question now for me. Please .
    Hi
    Check this Link:
    http://help.sap.com/saphelp_nw04/helpdata/en/a5/28d3b9d26211d4b646006094192fe3/frameset.htm
    P.S: Never say reply me soon....people answer you here voluntarily and as everyone has their own desk to manage...sp replies may late or early..depending upon the availabality of the members.
    Vishwa.

  • How to set the width and heigh in the popup window

    Hi All,
    I tried to show a report in a popup window style.
    In the column link section, I defined the URL like the following:
    javascript:popupURL('f?p=&APP_ID.:128:&SESSION.::&DEBUG.::P128_PAY_RATE,P128_PAY_TERMS:#PAY_RATE#,#PAY_TERMS#'). how and where to set the height and width for page 128?
    Thank you,
    spark

    Here is a sample of the JavaScript function I re-use that opens a popup window. You'll notice that it includes the width and height of the popup window:
      function callTCPopup (formItem1) {
        var formVal1 = formItem1;
         var url;
      url = 'f?p=&APP_ID.:1111:&APP_SESSION.::::P1111_TC_ID:' + formVal1;
      w = open(url,"winLov","Scrollbars=1,resizable=1,width=800,height=600");
      if (w.opener == null)
      w.opener = self;
      w.focus();
      }You could also look at using a Modal Page (Skillbuilders' plugin - watch the video for use).

  • How to set the HomePage and FolderSize of a managed folder?

    Recently, I deside to get the FolderSize and HomePage of a managed folder throw GetFolder operation in EWS, but the FolderSize and the HomePage always not present.
    Unfortunately, I could not set these two element directly in Exchange management shell like "StorageQuota".
    I tried to create some items in the managed folder, but I also could not get the FolderSize.
    How can I do next? Is there anybody know the ways to set the HomePage and FolderSize of a managed folder?

    Hi,
    We can use the Set-OrganizationConfig -ManagedFolderHomepage command to specify the homepage. To limit the managed folder size, we can use the StorageQuota parameter with the New-ManagedFolder command.
    Here is a related article about the Set-OrganizationConfig command for your reference.
    Set-OrganizationConfig
    http://technet.microsoft.com/en-us/library/aa997443(v=exchg.141).aspx
    Best regards,
    Belinda
    Belinda Ma
    TechNet Community Support

  • Please help me :How to set the width and height for my View page "test.htm"

    Hi,
        I have controller class. When i call the view[test.htm]from this controller class ,i am getting the view with output tableview..it is fine.
    My requirement:
                 the output view window is showing full browser window. I want the view output like showModeldialog. I want to set the width and height for the output view window. How is possible?
                 or
    i want to call the test.view in the window.showModelDialog..
    Please help me .. Urgent requirement.

    Yes you can set the width & Height of the view as follows..
    <div style="width:580px; height:750px; margin-top:15px; overflow:auto;">
    <htmb:form......>
    </htmlb:form>
    </div>
    <i>*Reward each useful answer</i>
    Raja T

  • How to set the ComputerName and Domain of my IPDA?

    Hey guys,
    When I use my PC(windows 7) to connect WIFI in our company, I have to set the ComputerName and Domain of my PC so that I can surf the internet. But I can't find the same settings in my IPAD. Although I can connect WIFI of my company, but I can't surf the internet now.
    How can I set the ComputerName and Domain of my IPDA?
    Thanks for the help!
    whvovi

    Start Menu->Right click Computer->Property->Advanced System Settings->Computer Name->Change
    At this place, I can specify my ComputerName, Domain and Workgroup.
    But I can't find these settings on IPAD.

  • How to set the size and position of JFrame

    hey all,
    i have a frame and i devide the frame into three panels, i want to make the top panel the lergest and make it square. and the rest two panels in small and in the bottom of the frame.
    could you please help me to set the size and position of the jpanel
    Thanks

    If u want the bottom 2 panels to be on the same level, u can try setting ur content pane to use the BorderLayout and the adding the 3 panels to it with BorderLayout.NORTH(for the TOP panel), BorderLayout.EAST(RIGHT panel) and BorderLayout.WEST(for LEFT panel).
    Don't know if this is what ur looking for, maybe u could describe more on ur layout with a sample image or something?

  • How to get imei number and mac address of mobile device on adf mobile

    Hi experts,
    I need to get imei number and mac address of device (supposed to be works on both android and iphone) on adf mobile
    bgrds

    Hi,
    Adf mobile support phonegap api. Version must be 2.0(you can check it by below code snippet) You can just reach uuid from both platform via cordova. Espescially, IOS restriction limits you to get device infos that you mentioned, but you can get uuid.
       getCordovaVersion = function ()
            var cordovaVersion = device.cordova;
            return cordovaVersion;
        getDeviceUUID = function ()
            var uuid = device.uuid;
            return uuid;

  • How to set the IP and hostname

    Hi All
    I have created a new OVM template from the ORACLE 10G VM template. (created a VM from original template and then did a save as template).
    Problem is that when I use this template to create a new VM - the hostname and IP (static) is the same as the original VM.
    How do I configure the network stuff? (no system-config-network on the VM)
    Any help would be great.
    TIA

    roynor wrote:
    The hostname is automatically set from /etc/host. The first name of the entry matching the IP address of the first interface will be used.This is not true. The hostname is set from */etc/sysconfig/network* on an Enterprise Linux server.
    However, a lot of the newer VM Templates have a first-boot configuration script that automatically runs from /u01 and is triggered from the */etc/sysconfig/oraclevm-template* file. Before saving your modified guest as a template, change RUN_TEMPLATE_CONF=NO to YES and then shutdown. When the guest starts back up again, it'll run the firstboot configuration again, which includes setting the IP/hostname information and relinking Oracle 10g.

  • How to set the classpath and path from the jsp to call  java class function

    Hi Exprets,
    I have a requirement to call a java class function which returns a hashmap object from the jsp. The java class in present in one jar file and that jar file is location somewhere in unix path. So the requirement is to set the classpath for that jar file and then create the object of the java class and then call the function.
    If any one know how to achieve it, please reply as soon as possible.
    thanks in advance,
    swapna soni.

    It is never advisable to store large data sets in the session. But it will depend on a lot of factors:
    1. How costly is the query retrieving the data from the database?
    If it's a complex query with lots of joins and stuff, then it will be better to store it in the session as processing the query each time will take a lot of time and will decrease performance. On the other hand if the query is simple then it's advisable not to store it in the session, and fetch it each time.
    2. Are there chances for the data to become stale within a session?
    In this case storing the data is session will mean holding the stale data till the user session lasts which is not right.
    3. How many data sets does the session already holds?
    If there are large no. of data sets already present in the session, then it's strictly not advisable to store the data in the session.
    4. Does the server employ some kind of caching mechanism?
    Using session cache can definitely improve performance.
    You will have to figure out, what is the best way analyzing all the factors and which would be best in the situation. As per my knowledge, session is the only place where session specific data can be stored.
    Also, another thing, if the data set retrieved is some kind of data to be displayed in reports, then it would be better to use a pagination query, which will retrieve only the specific no. of rows at a time. A navigation provided in the UI will retrieve the next/previous data set to display.
    Thanks,
    Shakti

  • How to set the window and mdi window size are set

    I am developing a login form ,
    I want that both window1 and mdi_form_window have the same size.
    I want to set the size of window width 300 and height 150 , how i can set the mdi_form_window for the same size so that the scroll bar is not displayed and the window1 is fitt in mdi form.
    thanks

    use
    SET_WINDOW_PROPERTY(FORMS_MDI_WINDOW, WIDTH, ...);
    SET_WINDOW_PROPERTY(FORMS_MDI_WINDOW, HEIGHT, ...);

  • How to set the number and width of divs of Graph?

    Hi, everyone.
    As the title, I want to design a virtual scope. And there is something I don't know
    how to set about Graph. That is I want to set the number of divs of X-axis and Y-
    axis with 10 divs of Y-axis and 8 divs ofX-axis. Additon, i also want to set the
    width of each divs. How can I do the setup?
    Thanks in advance!

    There are two ways of doing it.
    First, to do it offline, right click on the graph in front panel>> dropdown Menu select 'properties'>> Go to Tab 'Scales' and select relevant values for each axis
    Or to do it programatically, create a property node ( as shown in attached pic)>> select property>> x scale range / y scale range>> change it to write>> create a control to it and you can set following attributes: Minimum, Maximum, Increment, Minor Increment, and Start of that particular axis
    Hope this helps
    Regards,
    Dev
    Attachments:
    graph_scale.PNG ‏11 KB

Maybe you are looking for

  • ADF security : JAZN-LDAP

    Hi, We are working on the development of an application with Oracle ADF (JDev 10.1.3). We implemented security with lightweight XML provider and it's working perfectly. Next month we will deploy our application and so we will use a LDAP server. Is it

  • Blocked Order and Credit Exposure

    Hi, Does the blocked order form a part of Credit Exposure? Is there some config in which you can define this... Thanks

  • Download  File in  Background mode

    Hi SAP Gurus, I want to download file in Background using fn mod GUI_DOWNLOAD , it raises an  execption 'CONTROL_FLUSH_ERROR'. Is there any other way to do so.? Thanks in advance. Gaurav

  • Restore Business Rule(s)

    Help! I accidentally deleted 2 Business Rules from production. How do I restore them? I'm (still) on Planning 3.5.1. We have backups of all our production databases. Do I ask IT to restore the application db and I'll be able to retrieve the Business

  • Does jaxrpc with attachments work with Dynamic Proxies?

    I cannot seem to get jaxrpc with attachments to work with a dynamic proxy client. anyone get this to work and if do, can you post an example??? thanks, henry