Programming :: Passing Info From Mac To Network Layer

Dec 30, 2008

I want to implement a cross layer approach. I want to pass the network information such as delay from the MAC layer to Network layer. Can you tell me the way I am new to this. I am using linux (fedora). I think some system call will do the trick. Correct me if I am wrong. (I want to implement QoS matrices)

View 1 Replies


ADVERTISEMENT

Programming :: Parameter Passing: Parameters In General Info Requested

Apr 26, 2010

Ive read a few books and a lot of tutorials on C but can't find this topic explained in a deliberate way.I can find bits and pieces but nothing thorough.

View 9 Replies View Related

Kernel :: Send Pages Of 4096 Bytes From Layer Of Server To Layer Of Client Over A Network?

Jan 13, 2010

im trying to send pages of 4096 bytes from kernel layer of server to kernel layer of client over a network. previously i tried the foll. code , for data less than a 100 bytes it worked fine , but for something larger than that the computer hangs......(even the dmesg's wont say why) i also wanted to know how we could use the 'sendpage' function to solve this problem.

Code:

CLIENT'S KERNEL MODULE
struct iovec iov;
char buf[1024];

[code].....

View 1 Replies View Related

Programming :: Library For Get Info About Network Interface

Jun 23, 2010

I want to get info about network interfaces in C , is there any library for this purpose ?

View 1 Replies View Related

OpenSUSE Multimedia :: K3B - Dual Layer DVD Detected As Single Layer?

Aug 8, 2010

K3B says that my drive supports DVD-R DL writing. K3B shows it only having 1 layer.dvd+rw-mediainfo shows

Code:
INQUIRY: [ATAPI ][DVD A DH16A6S ][YA16]
GET [CURRENT] CONFIGURATION:

[code]...

View 8 Replies View Related

OpenSUSE Network :: IPsec On Network Layer In The OSI-model?

Jul 18, 2010

I want to know the IPsec-Advantages and Disadvantages that arise because of its location on the network layer in the OSI-Model. I read rfc2401 and rfc4301 specifications to find out the advantages and disadvantages of IPsec being located on the network layer in the OSI-Model (equivalent to Internet layer in the TCP/IP protocol stack). I really could not find enough good reasons for the advantages and disadvantages of IPsec being located on network layer. Here are some of them that I could think of:Advantage: - No application-specific implementation is needed (in comparison to SSL/TLS) - The ability to connect two subnets on the internet (tunneling mode) - Ability to encrypt the traffic between two end-points (transport mode)Disadvantage: - Complex implementation of ipsec itself - High computation performance when AH and ESP both activated - No encryption for the packets to the destination if it is arrived on the subnet on the other side when tunneling mode is activated.

(the network traffic is no more encrypted inside the subnet)What else can you guys add more to these advantages and/or disadvantages? The focus is IP-sec location on the network layer. (it is a kind of comparison to ssl/tls which is upper layer protocol)I would be grateful to any responses.P.S: I hope that this thread has landed in its right place.

View 2 Replies View Related

Programming :: Moving Files Up A Directory Layer?

Jan 3, 2011

find . -type f -name "*" -print0 | xargs -0 --replace=% mv % `pwd`

works fine at moving all files anywhere below the current directory to the current directory.

My question is can it be modified so it only moves all the files up one directory layer? Otherwise I shall have to cd 100 or so times and run it in each directory i want to compress...

I imagine the directory below which the file is stored is in the % somewhere it is just a case of extracting it and applying it to the mv command, yes?

View 8 Replies View Related

Networking :: Layer 2 Switch - VLAN Router To Network

May 15, 2009

Our ISP provides us with Layer 2 hardware (Modem?/Switch? (Hatteras)) for our leased line and internet access. I have been told that I should set up a VLAN capable router to separate the internet traffic from the internal traffic. I found that linux is capable of VLAN routing. Nice!

I have setup opensuse 10.3 put in two NICs and did the following
vconfig add eth0 10
vconfig add eth0 20
ifconfig public.ip.add.ress netmask 255.255.255.252 eth0.10 up
ifconfig 192.168.0.1 netmask 255.255.255.0 eth0.20 up

Plugged this NIC into the HATTERAS hardware (with a straight cable), and thought that this way I should be able to ping the public gateway or any ip out on the internet. My ISP is telling me that I should create a VLAN trunk to be able to 'use the internet', but as I understand in linux if I create any number of VLANs on one NIC they are already trunked. I also got the info, that the traffic is tagged, and I can separate the traffic reading the tags. I already read that some NICs are not able to VLAN because they are not able to handle the increased packet size.

Also that the MTU setting is important (dono' the exact value though, only that its important). I thought that a linux machine can act as a router and firewall in such a case, because proprietary switches/routers use linux as embedded os. This is my first meeting with VLAN so if this whole post does not make any sense or you think that I just need to RTFM more then tell me! I also have some (3) Dlink 3226 Layer2 switches around, but I think it would be waste to use a 24 port switch on this subject.

View 12 Replies View Related

Programming :: Passing Class To Itself (CPP)?

May 18, 2010

I'm struggling with the issue of passing a vector of a class to itself, here's what state its in now... (tried many variations, but without direction).

Code:
#include <iostream>
#include <string>

[code]...

View 2 Replies View Related

Programming :: Passing Data Between Php And C

Aug 21, 2010

I'm trying to work out the best way to achieve the following.

1)php page that grabs data from a local database. (not a problem)

2)It then needs to send this data to a c program/service running on a remote server. (I probably need it to be able to handle 4+ million reocrds in an array)

3) The c service then needs to process the data and send it back to the initial php script that called it. i was hoping this could be in a an array like structure of some kind. 4)update the db with the results.

I was thinking of using gsoap to write a simple c soap service that php can communicate with. Would this be the right way of doing this or would something like sockets in php be a better way of sending this volume of data as an array or struct to linux c socket if thats even possible.

View 3 Replies View Related

OpenSUSE Network :: Unable To Detect Network Info In Laptop

Jun 8, 2011

I am having a situation where I couldn't connect to Internet through wireless and LAN cable. I have done ifconfig, it only shows me "lo" info. May I know how can I bring up the LAN and wireless?

View 2 Replies View Related

Programming :: Passing A Source Ip To The Server?

Jan 12, 2011

i'm programming a small tcp client, but i need that the server knows the source ip. My client receives a external connection and forwards, but the ip seen by the server, of course, is the client ip. I would like, change this ip to original source ip.

I don't know how to do this. I tried with the connect and select function.

View 5 Replies View Related

Programming :: Bash - Passing Variable To Ssh?

May 8, 2010

I have a file with around 1000 IP addresses in it and I need to be able to ssh into each one of them, run a single command, and then exit. I already know the ssh command I want to run and it looks like this:

Code:

shpass -p [password] ssh -p 10022 -o StrictHostKeyChecking=no root@[ip variable] 'reboot'

(I know shpass is not good to use and keys are the correct way but I don't have any other options in this scenario.) if these ip addresses were in a .csv file, by themselves with no other information, how would I create a script to do the above command to each ip until the end of the file?

View 8 Replies View Related

Programming :: Parameter Passing In The HTML?

Jun 11, 2010

If I have the following links in HTML

Code:

<a href=lang.php?lang=cymraeg>Cymraeg</a>
<a href=lang.php?lang=english>English</a>

and lang.php has a link to page2.html, how do I pass on the value of the lang parameter from lang.php to page2.html? The value needed is the one passed in to lang.php.

View 3 Replies View Related

Programming :: Passing A Char* By Reference In C++?

Apr 26, 2010

Below I've presented the declaration, definition and the calling method of a function w.r.t pass by reference:

Declaration

Code:

void getUnpackedMsg (unsigned char &data, unsigned int numberOfBits);
Definition
line 278: Shown in RED

Code:

void packedMessage :: getUnpackedMsg (unsigned char &emptyArray, unsigned int numberOfBits)
{
...
...
printf ("

[code].....

View 3 Replies View Related

Programming :: Passing A Variable To Bc In Bash ?

Jan 14, 2009

I cannot for the life of me get this little (simple) script I wrote to work. Here is the entire script:

Code:

#!/bin/bash
ASPECT=`mediainfo $1 |grep "Display aspect ratio" |cut -d : -f 2`
HEIGHT=`echo "320 / $ASPECT" |bc`
SIZE=`echo 320x$HEIGHT`

[code]......

An input filename ($1) is fed into mediainfo, which by the use of grep and cut spits out a single number which is the aspect ratio. This is then divided by bc into 320, which gives the desired height dimension for the file that I want ffmpeg to create for me. Finally, ffmpeg runs using the calculated dimensions... Basically, it's the passing of the $ASPECT variable to bc that seems to fail. It looks like bc won't read the output from the mediainfo line... It always crashes out with:

Code:

(standard_in) 1: illegal character: ^M I've tried doing something even simpler like this to debug by just trying it to display the calculation on the screen:

Code:

#!/bin/bash
ASPECT=`mediainfo $1 |grep "Display aspect ratio" |cut -d : -f 2`
HEIGHT=`echo "320 / $ASPECT" |bc`
echo $HEIGHT

and it does the same, so it's definitely bc that won't accept the output from mediainfo.

View 4 Replies View Related

Programming :: Passing Variables By Reference?

Mar 19, 2010

I was trying to make a code for passing variables by reference..here's the code:

#include<iostream>
using namespace std;
void fun(int& ,int& );
int main(){

[Code].....

invalid initialization of non-const reference of type 'int&' from a temporary of type 'int*'

View 9 Replies View Related

Programming :: Passing Data To A New Thread?

Feb 11, 2011

I have to launch a new thread from my existing main program and pass data to it.
For now the data is simply a string value.

How I go about passing data to a new thread while it is running.

View 5 Replies View Related

Programming :: Passing Values Through Pages?

May 23, 2010

I have the following snippet HTML code:

Quote:

<table id="profile">
<tr>...............</tr>
<tr>
<td width="40%">

[Code].....

How can pass values in args[0] and args[1] to Perl/CGI script?

View 2 Replies View Related

Ubuntu Networking :: Message Passing Over The Network?

Jun 25, 2010

We have a ubuntu machine on the network with number of users in it. Basically, when other users connect via telnet i want then to get particular messages depending on the user. The message will be set by the administrator or a particular user with privs. Similarly we also need a to-do app via which users can update their work and see each others progress . Its all in a local network. Do tell what would be the best way to do it!

View 2 Replies View Related

Debian Programming :: Passing Variable Between Invocations

Jan 9, 2014

I want to build on the code from /etc/apt/apt.conf.d/05etckeeper to work with Snapper, the new-in btrfs (et al) snapshot package.

Code: Select allDPkg::Pre-Invoke       { "if [ -x /usr/bin/etckeeper ]; then etckeeper pre-install; fi"; };
DPkg::Post-Invoke      { "if [ -x /usr/bin/etckeeper ]; then etckeeper post-install; fi"; };

The etckeeper code will work well as a template, but I need to pass a parameter between the pre- and post- instances. The parameter is obtained from the pre- invocation and passed to the post- invocation.I know that something similar to my quest is done with the 'pid' but how to do it in the 'standard' way. Happily there can't be multiple dpkg instances running concurrently (prevented by dpkg?) so I don't have to worry about that issue.

Q1. What is the 'standard' way of passing parameters about?

Code: Select allsnapper -c etc create -t pre  -p     (which 'prints' the parameter (int) to pass to the following invocation)
snapper -c etc create -t post --pre-number  <parameter>  in place of the two etckeeper calls.

Q2. How do I pick up the 'printed' output of the 'pre' call? I think it's just a 'get' from the stream but perhaps I've missed something.?

View 2 Replies View Related

Programming :: Passing The Char * Vector Argument?

Jun 19, 2010

I am trying to simulate a shell. So what I do is checking of having the parameters from standard input, suc as "/bin/ls -l /home/france/Documents", and then passing them to function execute, which at some point calls execvp(argv[0],argv)The problem is that I don't succeed in using these arguments, while if I call execvp(paramList[0],paramList) it works!!!! Where paramList is exactly what I would put on standard input, but defined statically.

Code:

#include<unistd.h>
#include<stdio.h>
#include<stdlib.h>
#include<string.h>

[code].....

View 2 Replies View Related

Programming :: Passing Input To Program For Test

Apr 13, 2011

I started to run a C++ my program in Linux and I don't know how to test my program that works fine with a text file. This is a project for my uni and to explain more clear, My program is a sample database for modify or add and search and it read data from a binary file and also write into a binary file. I have got an input from my lecture and she said after compiling in Linux I must write:

1-to compile:
Code:
g++ (files with cpp)
2-to see the output:
Code:
./a.out
3-to test with input:
Code:
./a.out < input.txt >

My problem is in step three. What I must write in the command part after" step2" to see the output?

View 3 Replies View Related

Programming :: Passing An Object To A Running Thread?

Jan 14, 2011

This is a client server issue where the server creates a new thread for listening to a new client, now when the thread starts execution and during its execution the server needs to pass it an object of some X class, how's that to be done?

View 4 Replies View Related

Programming :: Passing Another Program A Password And Username?

May 14, 2010

Are there any security implications in passing a binary unix program a username and password via variables from within a script ?

View 14 Replies View Related

Programming :: Passing Arguments To A Child Process In C++?

Feb 7, 2010

what I am trying to do is to pass an argument to the standard input stream of a child process. I mean I create two programs .. first one invokes the other. second one contains something like

Code:

scanf("%d", &n);

now I want my first program to be able to pass a value to the second one so that it gets stored in n.

View 7 Replies View Related

Programming :: Passing Arguments To System Command?

Dec 17, 2009

I am calling another executable in my application (C programing) using "system" command
which is user interactive program. now i want to pass those args in system command only.

system(" executable ");

Executable will expect 1,2 or 3.

1 is to continue
2 for do changes in settings
3 exit from application

how to pass these in to system command

View 1 Replies View Related

Programming :: Passing Array From One Perl Script To Another?

Dec 14, 2010

How do I pass an array from one perl script to another .. also how to read it in another script ?I tried below -

Script 1 - sender program
system ("./program2.pl @array1 @array2");
printf("

[code]...

View 2 Replies View Related

Programming :: Passing Array To Thread Function?

Aug 12, 2010

I am trying to pass an array to thread program. Its printing the val[0] value but its not printing value at val[1]. Can somebody help me with this problem.

Code:
#include <unistd.h>
#include <stdlib.h>

[code]....

View 4 Replies View Related

Programming :: Passing Commands To Running Daemon?

May 10, 2010

I am working on a daemon that I want to change some variables while its running. Is this possible?I want to implement a command line type interface for my daemon so I can send it commands that will change the current values of specific variables, and also be able tell the daemon to load/save a config file.The only thing I have found so far is passing arguments to a daemon, but that seems to be a one-time shot when your first starting it.

View 6 Replies View Related







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