Programming :: Assign Absolute Address To Pointer

Dec 20, 2010

I want to assign an address location to a pointer and wanted to display the value at that memory location.I wrote a small program for this and it is like this : (i am using gcc 4.4 compiler)

# include "stdio.h"
int main()
{
unsigned int *a;
a=(unsigned int *)0x3f8;
printf("%u",*a);
return 0;
}

But it is giving Segmentation fault

View 14 Replies


ADVERTISEMENT

Programming :: Access The Address Of A Character Pointer?

Jul 12, 2010

i was trying to access the address of the character pointer it gives me the values stored in the variable.

Code: #include<iostream>
using namespace std;
int main()
{
char *i;

[Code]....

why is my code not giving the address of the variable i when it is a character pointer.

View 2 Replies View Related

Programming :: Get The Page Pointer From A Physical Address?

Oct 18, 2010

How do I get the page pointer from a physical address?

View 1 Replies View Related

Programming :: Assign IP Address / Renew DHCP From Kernel Module?

May 14, 2010

I'm currently working with wireless network kernel module.

This device initialiy gets its IP address by using DHCP,
but the problem is sometimes the new IP assigned for internal reason.

So what I want to do is assigning new(changed)IP address into exsiting
interface, or occuring DHCP renew event to cause update IP from kernel
level. This shold be done without user's intervention, so whenever the
kernel module detects IP changed(via underlying wireless
communication), it automatically correct update its IP address.

Q1) any functions or api to cause DHCP renew event from kernel level?
Q2) or any functions or api to assign IP address to specific interface?

View 3 Replies View Related

Networking :: Program To Assign Globa LIPv6 Address And Bind() To The Previously Assigned Address?

Apr 24, 2010

Consider the following program:

Code:
#include <stdio.h>
#include <stdint.h>

[code]...

View 2 Replies View Related

Networking :: Assign A Address To Ethernet Address?

May 29, 2011

how to assign a address to my ethernet card all the options available

View 1 Replies View Related

Programming :: Pointer To Pointer Segmentation Fault?

Jun 27, 2009

I have been googling trying to fix this ... basicly I have a (int **) variable, and when I try to pass a (int) value to a specific position, I have seg.fault.Resuming what I have is:

int ** p;
p[0][0] = 1; //segmentation fault

View 7 Replies View Related

Programming :: Use Absolute Sections In Gnu Assembler?

Feb 14, 2011

how to use absolute sections in gnu assembler?

View 2 Replies View Related

General :: How To Assign IP Address

May 14, 2010

I have a fresh installed redhat 9 with 1 network card attached may I know what command will I type to assign 10.0.0.1 on the network card?

and also when I type hostname it always reply localhost.localdomain

how can I assign a hostname

View 4 Replies View Related

Ubuntu :: Assign A Static Ip Address?

Jun 13, 2010

I want to assign a static ip address, my network/interfaces files shows

Code:
auto lo
iface lo inet loopback

am I correct to add

Code:
iface eth0 inet static
address 10.42.43.10
netmask 255.255.252.0
gateway 10.42.43.1

or is there more I need?

View 4 Replies View Related

Networking :: How To Assign IP Address To EC2 Cloud

Nov 15, 2010

I have set up a cloud (Ubuntu) environment in my test lad and it's working fine I am confused setting up the public IP in the production environment. The cloud instance will get only a Internal IP address ( Private) we cannot bind the Public Ip to the cloud instance as it uses Elastic IP, so I am confused how can I set up this if I have about 250 Public Ip to 250 cloud instance. How will I map this 250 Public IP with the 250 internal IPs is there any hardware device.

View 3 Replies View Related

Programming :: Reading The Absolute File-path As Sorted?

Jun 13, 2010

I wanted to read out the absolute file-path (filename) as sorted in a folder (on Linux). The reading the file-paths is ok but I have problems in sorting.

Code:

selectedDirectory = fl_dir_chooser ("Select Imagedirectory:",NULL,0); //This is just a widget to show the folder.
DIR *d;
dirent *de;

[code]....

The files -105.dcm, -106.dcm, -107.dcm lie in the folder at the bottom and -36.dcm, -37.dcm- at the top. The program compares 1 and 3 of 105 and 37, 1 is lesser than 3, then prints out first, but does not know that 105 is three digits and 37 is two digits.

View 1 Replies View Related

Fedora Servers :: Cannot Assign IP Address To Eth0

Feb 17, 2009

Just Installed Fedora 10 on Dell PowerEdge 2950. Installation went fine. Problem is I cannot Assign a Ip address to eth0. Service "NetworkManager " dies on its own "ifconfig eth0 192168.0.8/24" works though.

View 6 Replies View Related

Fedora :: Error: Cannot Assign Requested Address

Jun 7, 2010

Every time I upgrade my system I run a post install script. This script made some harm to the network start that prevents sshd from starting, but I was unable to detect the problem. In my boot.log I found this:

[...]
Starting NetworkManager daemon: [ OK ]
Starting Avahi daemon... Jun 2 14:58:48 Antares kernel: ADDRCONF(NETDEV_UP): eth0: link is not ready

[code]...

So there is a "bind to port 22 failed" probably caused by "eth0: link is not ready", but after the sshd init script fails the eth0 is ready...

View 9 Replies View Related

Networking :: Assign Own IP Address On Ubuntu Desktop?

Jan 20, 2010

I am a certified newbie into linux. I am using now ubuntu 9.04. Now here is my question. Is it possible to assign your own IP address on your ubuntu desktop, I mean a fixed IP address? Because everytime I start my computer, my internet service provider will automatically assigned a NEW IP address to my computer, but when I'm on windows the ip address is fixed.

I've installed and configured lampp and joomla. I am trying to learn how to use the joomla under ubuntu using only my computer as my local host. But when I restart my computer, the IP Address that is assigned is different to what I used when I installed joomla so I cant access my website even if I am using the same computer when I installed it. Is it possible to assign a fixed IP Address to my computer under ubuntu.

View 7 Replies View Related

Networking :: Assign An Alternate Ip Address On Same Lan Card

Jul 10, 2010

I am running Linux AS4 Update version. I have one lan card and the primary IP-Address is 192.168.0.215 & subnet is 255.255.255.0

Now I want to assign an alternative IP-Address on the same card & the IP I want to assign is 192.168.15.215.

I run the following command from root user:

Now when I ping this IP 192.168.15.215 From Windows machine then its reply me & properly reply comming from this Ip.

But when I want to access this Ip by \192.168.15.215 from run prompt then it gave me error. The specified network name is no longer available..

I already restart the machine & network service but the problem remains same.

View 2 Replies View Related

Networking :: Assign A Private IP Address To The Same Interface?

May 15, 2011

I recently just upgraded from humble Linux user to confused Linux admin of my own virtual Linux server. When I issue the ifconfig command I get following output.

Code:

venet0:0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
inet addr:1.2.3.4 P-t-P:1.2.3.4 Bcast:1.2.3.4 Mask:255.255.255.255
UP BROADCAST POINTOPOINT RUNNING NOARP MTU:1500 Metric:1

The WAN IP of the interface is not really 1.2.3.4 I just changed that IP for security reasons.What I am trying to figure out, is it possible to assign a private IP address to the same interface or can I only have one IP address per interface. I understand I have a mask of /32 so I am not going to be able to subnet the address to create any more addresses, so I assume I am stuck with the WAN IP (public IP) that I have, and just need to deal with it.

The reason I ask this is because I have been reading through several DNS/BIND tutorials/walk-throughs, and a lot of them specify setting up a intranet access with 192.168.1.1 address for the local DNS server, but since I am connecting to the sever via SSH I figure I do not need a private IP address.

View 5 Replies View Related

General :: Assign IP Address To 2nd Ethernet Card?

Jun 22, 2010

In my red hat Linux machine there was a Lan card using eth0. IP is asign to that network card and it is functioning properly. I add another ethernet card in my linux machineit was detacted and when i use the commandQuote:[root@localhost root] # ifconfig -ait show me both eth0 and eth1 lan cards.I can see Ip address in my eth1 ethernet card but When I enter into

Code:
[root@localhost root] # cd /etc/sysconfig/network-scripts
and i use ls command it only show me the file ifcfg-eth1 and with

[code]...

View 8 Replies View Related

General :: Assign IP Address Using Command Line?

Mar 26, 2010

I am using internet in my home PC using Red Hat 9. To assign static IP to my linux machine I use "System Settings....> Network" and then double click on "eth0" to assign the static IP.Well these all settings by using GUI interface.Kindly guide me that if I use only command line interface "runlevel 1" then in that case which file should i edit and assign my static IP,Subnet Mask,Default Gateway DNS settings.2- 2nd thing is,is there any way that I may open web broswer in command line? or the administrator should only use internet on Run Level 5 ?

View 14 Replies View Related

Server :: Assign An Alternate Ip Address On Same Lan Card

Jul 10, 2010

I am running Linux AS4 Update version. I have one lan card and the primary IP-Address is 192.168.0.215 & subnet is 255.255.255.0

Now I want to assign an alternative IP-Address on the same card & the IP I want to assign is 192.168.15.215.

I run the following command from root user ifconfig eth0:1 192.168.15.215 netmask 255.255.255.0 up

Now when I ping this IP 192.168.15.215 From Windows machine then its reply me & properly reply comming from this Ip.

But when I want to access this Ip by \192.168.15.215 from run prompt then it gave me error.

The specified network name is no longer available..

View 5 Replies View Related

Server :: CentOS 5.3 - Assign IP Address To Printer

Jan 28, 2011

My server is Linux (centos 5.3). In Server System Dhcp server is running, so it assign ip address to client windows .....
1. I want to assign ip address to Printer (printer Hp laser 3055 )
2. How do I configure cups (Network Printer) in linux server
3. How to configure printer in windows client....
How to do this.

View 1 Replies View Related

CentOS 5 Server :: Trying To Assign Static IP Address

May 1, 2010

i am trying to assign a Static IP address and for the life of my i cannot get it to work Can someone explain to me the easiest way to do it and if i restart the server it won't get lost either.

View 1 Replies View Related

Fedora Networking :: Get The Router To Assign An IP Address Through DHCP?

Jan 24, 2009

I noticed that my internet connection wasn't automatically brought up each time I logged into Fedora so I opened the system-config-network tool and edited my network adapter by checking the box marked "automatically start at boot/login." To my surprise, the connection went down and upon trying to click on the device to let the manager bring up the connection the greyed-out phrase "device not managed" appeared underneath the device name and wouldn't allow me to connect.

Even when I used ifconfig/dhclient to get the connection up nothing happened. I could get the router to assign an IP address through DHCP, pinged a few sites to make sure it was legit, but still couldn't use firefox to browse anything. Seems as if network manager GUI is conflicting with command line attempts to bring the network up. I'd like to permanently disable system-config-network if possible because it's acting screwy!

View 5 Replies View Related

Ubuntu Servers :: Apache 2 (99)Cannot Assign Requested Address?

Mar 20, 2010

my Apache2 was running fine for a while. Bur yeserday when I tried to start it again after a couple of weeks of vacation, I got the message:

* Starting web server apache2 [Sat Mar 20 10:48:12 2010] [warn] The Alias directive in /etc/phpmyadmin/apache.conf at line 3 will probably never match because it overlaps an earlier Alias.

[code]....

View 7 Replies View Related

Ubuntu Networking :: Unable To Get DHCP To Assign IP Address

Mar 22, 2010

I'm using Ubuntu 9.10, and I want DHCP to assign an IP address automatically. I can ping my router, and get a reply. I just have no idea how to do this.I'm trying to get my Ubuntu machine onto my Windows network.

View 9 Replies View Related

Networking :: DHCP To Assign Specific IP To A Particular MAC Address Of A Machine?

Feb 22, 2010

I want to setup 1Gbps our lab network and we purchased 'Buffulo Giga layer switch ' with 24ports. Is there a way to tell DHCP to assign specific IP to a particular MAC address of a machine ? We want to use DHCP and whatever the port we use ,it should have same IP ..

View 1 Replies View Related

CentOS 5 :: Squid 3.0 Error:(99) Cannot Assign Requested Address?

Aug 13, 2009

I have got squid 3.0 stable 13 installed on a new centos5 box .I have used it on other centos5 ones and it has worked really well.It didnt give any error messages during installation on this one until i used the proxies in the browser.I have used it on other centos5 ones and it has worked really well.But with this box I am getting this error in browser-The following error was encountered while trying to retrieve the URL:Yahoo!Socket FailureThe system returned: (99) Cannot assign requested addressSquid is unable to create a TCP socket, presumably due to excessive load. Please retry your request.I have tried many options for http_port but to no avail.I have never seen this error before with and am totally clueless

Excerpts from cache.log
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2009/08/13 05:57:17| Squid Cache (Version 3.0.STABLE10): Exiting normally.

[code]....

View 2 Replies View Related

General :: Network Connection - Doesn't Assign Any IP Address To Machine

Feb 11, 2009

I have installed Ubuntu 8.10 Server Edition on Virtual Box. When I start the virtual machine I do not have connection to my home network. The router I have does not assign any IP address to this machine. Now I have some questions which I am finding hard to find answers for over the internet and other forums.

If I do have a network interface (I checked this using ifconfig -a) then is there a command to actually make the operating system connect to that network (something like repair on windows)?? Also what is the difference between a network interface with alias eth0 and eth5? I know that when it was eth0 the virtual machine used to connect to the network automatically. Now that it is eth5 it does not! I do not know however if this is related.

View 3 Replies View Related

Ubuntu Servers :: Assign The Static IP Address Of Internet Connection

Jan 14, 2010

I was trying to assign the static IP address of my internet connection to my home server and managed to make a mess of it. I've configured the router to assign it the address every time but when I rebooted everything the server is cut off from the network completely (rather unfortunate with a headless server...). The only file I've edited on the server when trying to do this is /etc/network/interfaces, everything else network related is default. My intention in editing the file was to make the server accept the IP address assigned by the router since the router was already configured to assign the right one. I put in

Code: inet dhcp in the /etc/network/interfaces file, is that wrong? What is that line supposed to be?

View 9 Replies View Related

Ubuntu Networking :: Assign An IPv6 Address To Separate Users?

Apr 15, 2011

I have an Ubuntu 10.04 server/router with IPv6 internet connectivity (I have an internet routable /64 subnet). Since I have this abundance of IPv6 addresses I wanted to try and assign v6 addresses to specific users on the local system. I've been looking at ip6tables with packet mangling but I don't seem to be able to find out how to do this or if this is even possible.

Current configuration: eth0: Local network, has the /64 IPv6 public range active and the IPv4 LAN range. tun0: 6in4 tunnel with a ISP assigned public v6 address. eth1: Standard IPv4 internet connection.

All users on my system use the v6 address configured on tun0. I want to force them to use the /64 range which is configured on eth0. If I can force users to use a specific v6 address, I'll configure more then one v6 address on this interface based on the users userID on the system.

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved