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


ADVERTISEMENT

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 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

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 View Related

Networking :: Renew Ip-address With Mac-address?

Jan 18, 2010

I have a dedicated control computer that can only be accessed with web-browser (with its ip-address). My DHCP-server gives a static ip-address to the control computer (base on its mac-address). Somehow and after some time the control computer looses its ip-address (can't ping to it any more) ... and then I have to reset the control computer to get it to pick up the ip-address ... this is not a good solution since the control computer is not nearby. is there a way to force the control computer to renew its ip-address based on its mac-address

View 1 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

OpenSUSE Network :: Using As A Network Gateway - Renew DHCP Lease

Jul 15, 2010

Why trying to avoid ranting about my Linksys router, I'll try and keep things short. I have a Linksys router in which the default firmware was terrible and would not correctly renew its DHCP lease. After getting feed up with that I flashed dd-wrt on the router and now it works better but randomly DNS queries would stop being resolved. To rule out the chances that it is my ISPs DNS servers I switched my DNS to openDNS, same problem happens (although I have to admit openDNS is a lot better than what my ISP has).

Anyways I'm about feed up with it and about an inch away from drop kicking the thing out my window. To avoid that I figured I will give it one more change and instead of using my Linksys as my network gateway I'll move all of that to my home server, and make the Linksys just an wireless AP. Besides setting up DHCP, DNS, and iptables on the server is there anything else I will need to know and setup on the server to make this work?

Side note anyone using openSUSE for DHCP know if setting up reserved IPs for certain MAC address is possible?

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 :: Paralel Port Kernel Module Programming

Jan 5, 2011

do you have any code to flash led lights with paralel port (device driver programming)or any lecture about this subject .if there is a working code this would be better ofcourse.

View 1 Replies View Related

Networking :: Configure A (openSUSE) Client To Dhcp To EBox DHCP Server - Lease An IP Address

Mar 25, 2010

I am puzzled with trying to configure a linux (openSUSE) client to dhcp to eBox DHCP server. I am using dhclient to lease an IP address with dhclient eth0 -s 10.45.48.108 and get a response

openSUSE11232CL1 dhclient: DHCPDISCOVER on eth0 to 10.45.48.108 port 67 interval 4
openSUSE11232CL1 dhclient: DHCPOFFER from 10.45.48.108
openSUSE11232CL1 dhclient: DHCPREQUEST on eth0 to 10.45.48.108 port 67
openSUSE11232CL1 dhclient: send_packet: Network is unreachable
openSUSE11232CL1 dhclient: send_packet: please consult README file regarding broadcast address.

The server reports eBox141 dhcpd: DHCPDISCOVER from 00:0c:29:3e:57:a3 (openSUSE11232CL1.domain.net) via eth0
eBox141 dhcpd: DHCPOFFER on 10.45.200.2 to 00:0c:29:3e:57:a3 (openSUSE11232CL1.domain.net) via eth0

I interpret this as the server receives the request and the client accepting it but the lease does not last long and the connection breaks. what this could be and why the connection breaks? Or my undestanding is totally wrong on how it works and should work? And BTW, where is that README file that's referenced in the message I receive on the client?

View 2 Replies View Related

Slackware :: WEP 64-bit - DHCP Won't Assign IP

Jan 6, 2010

The router is set up to use a 64-bit WEP passphrase. From what I've read, that means four different hex keys. One of which is meant to be active. I've tried each of the four generated keys, one-by-one. I've also tried putting them all in and activating one, but the syntax seems to be wrong.

I read Alien's Wiki on it, and various other sources. People keep suggesting wicd, but I want it to work with the rc.inet1.conf file first. Just so I know what needs to be entered in order for that to happen. I have a desktop to set up eventually as well, and that shouldn't need wicd.

My configuration file*: [url]

My lspci entry for the wireless card:

Code:

*I've edited this several times since upload, but nothing has worked so I don't think I need to keep it up-to-date. The online file is basic configuration, I believe.

View 2 Replies View Related

Debian Programming :: Building Kernel Module

Dec 8, 2013

I'm trying to build the kernel module for dvbhdhomerun. The problem is the linux kernel headers provided by Debian do not have the dvb header files. Trying to set up my own kernel source tree to use is not working out so well.

I'm following the instructions in the Debian section here: [URL] ....

My first try compiled, but the modules ender up under /lib/modules/3.2.51/extra instead of /lib/modules/3.2.0-4-amd64/extra. Why?

I tried to start over, but noticed this while running apt-get source linux-image-3.2.0-4-amd64:

Code: Select allReading package lists... Done
Building dependency tree       
Reading state information... Done
Picking 'linux' as source package instead of 'linux-image-3.2.0-4-amd64'
NOTICE: 'linux' packaging is maintained in the 'Svn' version control system at:
svn://svn.debian.org/svn/kernel/dists/trunk/linux/

[Code] ....

The failure to verify the signature has me concerned, but beyond that, what do I do about the different version number when compiling and installing the kernel modules?

View 1 Replies View Related

Programming :: Compiling Kernel Module Using (/asm/system.h)

Apr 3, 2011

I`m trying to compile sources of kernel module which has been written for kernel 2.6.9. There were many changes in kernel headers since then in current kernel sources. I`ve found that old /asm/system.h was moved under architecture dedicated directory /arch/*/include/asm/system.h. Anyway during sources compilation I`m having errors related to kernel sources. It looks like there is something wrong with this /asm/system.h

Code:

../asm/system.h: In function �__cmpxchg�:
../asm/system.h:248: error: expected string literal before �LOCK_PREFIX�
../asm/system.h:254: error: expected string literal before �LOCK_PREFIX�

[code]....

View 3 Replies View Related

Programming :: Insert Kernel Module Into Menuconfig

Jan 14, 2011

I am looking for information to insert kernel module into kernel. I am not looking at dynamically insert of kernel module using insmod, modprobe etc. I am looking for statically insertion of kernel module procedure, such as what to change on makefile, what to change on menuconfig, what to change on .config file, etc.

View 2 Replies View Related

Programming :: Modifying The Elevator.c Module In Kernel?

Feb 22, 2011

There is a file called elevator.c. It is written as a module (i.e it has specific init and exit functions). However we are not able to see it in lsmod listing. We are working on a project where we need to modify this file. Compiling every time we change something will be time consuming. Is it possible to compile just this file and insert it as a normal module?

View 6 Replies View Related

Programming :: Compiling Kernel Module In Ubuntu?

Jul 6, 2010

I have just started learning Device driver programming in Linux and am stuck in my first program. Its just to see init_module and cleanup_module calls to use printk and see results using dmesg. program is:

Code:

#define MODULE
#include<linux/module.h>
int init_module(void)

[code].....

View 3 Replies View Related

Programming :: Writing A Trivial Kernel Module ?

May 28, 2010

I am trying to learn how to write a kernel module. I am following the excellent guide from The Linux Documentation Project called The Linux Kernel Module Programming Guide v.2.6.4.

My machine is running Ubuntu Lucid Lynx (10.04)

Code:

I installed the corresponding linux headers and just to make sure I also installed the linux source and extracted it in /usr/src

I am trying to run the following trivial kernel module

Code:

View 4 Replies View Related

Programming :: Writing To Console From Kernel Module

Mar 2, 2011

I'm currently doing a tutorial for writing kernel modules. Right now I'm still at the very beginning, i.e. writing my helloworld stuff.

But what I like to do now is to write stuff onto the console, and I don't get it. According to my tutorials I can print stuff on the console using the printk()-function as long as the priority-level of the macro used in printk() is lower than the console_loglevel (how can I find that value out btw?).

But it doesn't work for me. Even if I use KERN_EMERG it still gets only logged, but not printed on the console and I thought KERN_EMERG get always printed...

Here's my code:

Code:

Code:

Everything works fine. But as soon as there are any blanks in mystring, e.g.

Code:

I always get

Code:

Why do I get this error and how can I insert string with blanks?

View 5 Replies View Related

Debian Programming :: Compiling Linux Kernel Module

Aug 27, 2014

I'm trying to compile a Linux kernel module called hello-2.c using the command "make -C /lib/modules/$(uname -r)/build M=${PWD} modules" (without the quotes) (which I found online), and the following is the (seemingly successful) output.:

Code: Select allmake: Entering directory `/usr/src/linux-headers-3.2.0-4-amd64'
  Building modules, stage 2.
  MODPOST 0 modules
make: Leaving directory `/usr/src/linux-headers-3.2.0-4-amd64'

However, I don't see a hello-2.ko (in the same folder or anywhere else for that matter). I'm Using Debian GNU/Linux 7.6.

Everything I am doing is within a folder/directory called "thefolder" (without the quotes) in the "/tmp" directory (without the quotes).

Why I can't see a hello-2.ko, and what to do to get it?

View 2 Replies View Related

Programming :: Adding External Module To Kernel Source?

Apr 27, 2010

There is a module A which is compiled with the kernel. I wrote an external module B which exported a symbol using EXPORT_SYMBOL.The module A now needs to talk with that exported symbol (function call). For that i modified A so that it includes the function call from B. However i now get unidentified symbol errors during 'make' operation as symbols of B are not present during kernel compile and A now kind of depends on B.

One solution is that make B part of the kernel as well. However, it would mean that whenever now i try to compile a kernel with a different source, i have to modify the config files and everything to accommodate B.Hence i am seeking a solution which does not include modifying the kernel.

View 3 Replies View Related

Programming :: Build Module Against Headers That Are Not From Running Kernel?

Apr 13, 2011

I'm trying to debug a module I programmed but I don't want to do it on the running host but against UML (don't want to reboot every 5 minutes).

The UML kernel I downloaded is 2.6.38.2. I have already downloaded the ubuntu kernel headers for this version (they belong to natty though I'm running maverick.... when I installed the .deb file with dpkg I had no problem at all).

Now I'd like to build said module against these headers. How can I do it?

Here's the makefile for my module code...

View 1 Replies View Related

Programming :: Kernel Module - Flashing Caps-lock Led

Apr 16, 2010

I need a module that flash Caps-Lock led. Is it possible to use outb() function here for sending data to keyboard via port 0x64 ?

View 2 Replies View Related

Ubuntu Networking :: Static IP Address And The Install Configures For A DHCP Configured Address - Network Not Starting

Dec 16, 2010

Version 10.04 LTS. Installed desktop version and network worked but I needed a static IP address and the install configures for a DHCP configured address. I tried changing to static address using the System->Preferences->Network Connections application but was unable to get the system to come up with the network up.

So I manually modified the /etc/network/interfaces and the /etc/resolv.conf files. I restart the system but when I do an ifconfig, I don't see a configured IP address on eth0 (only the loopback address). If I run /sbin/ifup eth0 everything then works fine and ifconfig shows the correct address bound to eth0.

My files are as follows:

View 2 Replies View Related

Ubuntu Networking :: IP Address Set To Manual But Still Queries DHCP For Address

Mar 12, 2011

I'm running Ubuntu 10.10 and I'm having problems trying to assign it a static IP address. No matter what I put in the Preferences->Networking area (identifying the interface as Manual)... it still will query DHCP for an address if I run the dhclient command. I'm using to using ubuntu server where I just set the IP in the interfaces config file.

View 1 Replies View Related

Networking :: Assign Default Gateway Via DHCP At Random

Feb 21, 2011

I'm looking for a method to assign a default gateway via dhcp randomly depending on ether the last char of the mac being odd or even, or the time the user connects. Is there a good reliable way to achieve this?

View 2 Replies View Related

General :: Assign DHCP IP For Client For 5 Interfaces At One Shot?

May 11, 2010

I have a RHEL Machine. All I have is 5 Ethernet cards.I want all of them to be assigned IP through DHCP while I boot my system.

View 4 Replies View Related

Programming :: Firing Some Shell Command Like Ls - Mkdir Dir-name Via Kernel Module

Jun 10, 2010

How can we fire a shell command like ls,./a.out automatically in kernel space via a kernel module ? i.e. replacement of system() function of user space into kernel space.We need to develop a kernel module which can fire some shell command let say "firefox [url]" automatically to open google automatically from module.

View 2 Replies View Related

Debian Configuration :: How To Assign Specific Local IPs In Home LAN Using DHCP?

Apr 29, 2011

I have some beginner questions about DHCP, Avahi, and configuring a small home LAN.Suppose I have a dynamic IP address assigned by my ISP, which requires DHCP be enabled in my dsl modem/router/"firewall" [sic]. Suppose for simplicity I have just one PC behind the dsl modem.I think "enabling DHCP" in the modem/router means that a DHCP client runs on the router, which communicates with a DHCP server run by my ISP when I boot up a PC on my LAN. Is that guess correct? Can I get DHCP to assign a particular local IP, say 192.168.1.10 (which is not the one taken by the router--- for this discussion, let's say that is 192.168.1.0) to my PC each time I boot it up?

Now suppose I want to build a stand-alone firewall, so that my LAN will have the firewall and the first PC behind the modem, with the first PC virtually behind the firewall. By default, I think these will both have DHCP clients running which I need to configure properly. The firewall should also have a DHCP server which should control how local IP addresses are assigned, correct? I should try to arrange that the LAN has only DHCP server, only one NTP timeserver, only one DNS nameserver, correct?My first PC seems to have installed an autorun client called Avahi, which performs DNS multicast services and incorporates something called zeroconf which seems to have something to do with remote desktops, which I don't need and which is a potential security hazard. But it seems that Avahi is an intrinsic part of the KDE desktop and cannot be removed. Just want to be sure that Avahi can coexist comfortably with dhcp3-client, which is also installed on that PC. They perform different tasks, correct?If I can get the stand-alone firewall to work, I know I need to turn off the commercial firewall in the dslmodem/router/firewall device. Should I purchase a bridge and try to turn off the routing function also?

View 8 Replies View Related

Software :: Assign New Gateway When Servers Hosted On Non DHCP Network

Jan 29, 2009

Does anyone know if you switch networks Where you have your servers hosted on a Non-DHCP Network, and you switch your IP addresses, then do you have to switch change/assign your new gateway address? I'm not sure if its manually assigned? How do you do it? Also what about nameserver resolving?

View 2 Replies View Related







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