Programming :: What Parameter Should I Use For DestAddr.sll_pkttype And Sockopt.mr_type?

Sep 4, 2010

I want to send my data from my custom board to the computer.I write two codes for each device.I use Linux PF_PACKET socket, I can successfully send my packets and I can capture them by ethereal too.But I cant receive them by my own code. My code can receive other packets but not mine!Here is the code I used to receive packets. Where is the problem?what parameter should I use for �destAddr.sll_pkttype� and �sockopt.mr_type�?

=================================================================
struct sockaddr_ll destAddr;
struct packet_mreq sockopt;
struct ifreq f;[code].....

View 2 Replies


ADVERTISEMENT

General :: Don't See -k Parameter In Recent Modprobe (missing Parameter)

May 4, 2010

I got the following modprobe scripts modprobe -k -q streams what does the -k parameter mean?. is it exist in older modprobe? I don't see -k parameter in recent modprobe.

View 1 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 :: O_SYNC Parameter In Open Command?

Jul 9, 2010

I have a small board that has a static ram board attached to it. I have two different programs that each write to a byte of memory in the static ram board. I get a file descriptor to the device memory with the following code:

int phymemfd;
phymemfd=open("dev/mem, O_RDWR | O_SYNC);

This opens the physical memory for both reading and writing. Next I get a pointer to the beginning of my ram board.

volatile unsigned char *novram;
novram = (unsigned char *) mmap(0, getpagesize() * 31,
PROT_READ|PROT_WRITE, MAP_SHARED, phymemfd, 0x11AA0000);

I do this same code in two processes that are both running and this works fine. Now, if I take out the O_SYNC parameter, one of the programs gets into some sort of weird state.My understanding of the O_SYNC parameter is that it cause the process accessing the memory location to block, not allow another process to run, until the first process has finished writing to it.I can see that if my program doesn't block, I wouldn't really know what was in the memory location, but would I can't see how it would cause any other type of system problem.

View 1 Replies View Related

Programming :: Bash Script Position Parameter Does Is Not Parsing '$1'?

Apr 8, 2010

bash script:

Code:
$ bash --version
bash --version
GNU bash, version 3.1.17(2)-release (i486-slackware-linux-gnu)
Copyright (C) 2005 Free Software Foundation, Inc.

Code:
[serv:]$ cat test.sh
#!/bin/bash

[Code]...

The question is, how to config it works through 'function cool {}' or cool() {} with position parameter

View 5 Replies View Related

Programming :: C++ Passing Pointer Variable As A Reference Parameter

Jan 21, 2011

Say, i have an imaginary std library function, which I want to call.

Code:
void std_lib_func(ObjectType *param);

Now in my c++ program, I have a main() function, and I will like to call a customized function (which will in turn call the std lib function) from the main function, as below:

Code:
int main()
{
ObjectType *aobj;
customized_func(aobj);
}
[Code]...

I tried the below but get an error that the std lib function is expecting a ObjectType* param, not aobj. How should I work this out.

Code:
void customized_func(ObjectType aobj)

View 4 Replies View Related

Programming :: Capture Parameter From Iframe To Main.html?

Aug 28, 2010

I have the following HTML code in main.html:

Quote:

.............
.............
<tr align="right">
<td width="50%">

[Code].....

I'd like capture with capture_profile() function in createproject.html a value into main.html page. How can I solve this problem with javascript?

View 1 Replies View Related

Programming :: Find And Replace Using Passing A Parameter To Said Command?

Apr 9, 2010

I am trying following script can I do this or is there a way to do find and replace the replacing word is dynamic input by user

echo -n "Enter name:"
read RP_USER
sed 's/text1/$RP_USER/' /home/user/file1 > /home/user/file2

View 5 Replies View Related

Programming :: Pass By Reference A Parameter Without Assigning A New Object?

Dec 28, 2010

How can I pass by reference, a parameter, without assigning a new object? In my first example, var = "changed" creates a new local object. In the second, mylist.append will affect the reference target. How to i achieve the same effect with example 1?

Code:
#!/bin/python
var = "unchanged"
def print_string( var ):

[Code].....

View 2 Replies View Related

Debian Programming :: What Is Purpose Of Parameter Within Single Quotation Marks

Oct 20, 2014

what is the purpose of the parameter within single quotation marks and what it does? I am assuming it is a call to pkg-config with those paramaters.

Code: Select allgcc -o gtkprog gtkprog.c `pkg-config --libs --cflags gtk+-2.0`

Using:
Code: Select allpkg-config --libs --cflags gtk+-2.0
-pthread -I/usr/include/gtk-2.0 -I/usr/lib/x86_64-linux-gnu/gtk-2.0/include -I/usr/include/gio-unix-2.0/ -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/libpng12 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng12 -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/freetype2 -lgtk-x11-2.0 -lgdk-x11-2.0 -lpangocairo-1.0 -latk-1.0 -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lpangoft2-1.0 -lpango-1.0 -lgobject-2.0 -lglib-2.0 -lfontconfig -lfreetype

So, if my logic serves me right, this command parameter is a neat replacement for this litany of libraries to be used in the compilation process.

View 1 Replies View Related

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

General :: What Is 'positional Parameter'?

Mar 21, 2011

I need a simplistic explanation of positional parameter. Have read all I can get my hands in, I kinds of understand to an extent, but I want to get. Full grasp of it. Oils like to know what is does, its functions, when to use it, and all its functions. Thanks in anticipation. Distro Red hat.

View 6 Replies View Related

Red Hat / Fedora :: Parameter Sent To Script That Are Resources?

Apr 1, 2011

i have 2 front ends that receive traffic (http server) and should run some scripts in crontab, some of the scripts should just being running by 1 server at a time (active one) and others should run on both. Regarding the http like is load-sharing i think i cant use heartbeat, right? heartbeat is just for active-stanby or can we use to a active-active as watchdog? i have a cisco css to load sharing the http, and i can make a watchdog script to the apache. Regarding the cron crontrol i was thinking to make a script that replaces the crontab file to whatever is the correct one.

When the heartbeat start what parameter is sent to the script that are resources? a start if active node and nothing if is the standby?allways start?how should i config the haresources to do it? what is the best way? i have other situation that is making a nfs server in solaris 10, i have 2 servers with shared disks ( sun array), can i use heartbeat to this too? it is possible to make it in such way that if i had i failover in nfs server the clients doesn't need to reconnect?

View 2 Replies View Related

General :: Shutdown Parameter 't' Functionality How-to?

Dec 28, 2010

It looks like the -t parameter is no longer available when using the shutdown command. What I'm trying to figure out is how to send all the daemons the kill signal, but wait a certain amount of time before actually halting or rebooting. I can't be the only one wanting to do this, but for all the searching I'm doing I can't find an answer.The following only warns, then waits 1 minute before sending the kill signal and immediately halting, correct? Or am I getting this completely wrong?

Code:# shutdown -h +1

View 4 Replies View Related

General :: How To Change Kernel Parameter

Oct 11, 2010

i m using following kernal.

Code:

# uname -r
2.6.18-128.2.1.4.9.el5xen

According to security manual i need to incorporate following changes into kernal parameter but i m not sure when and how these changes will be implemented.

Code:

net.ipv4.conf.all.accept_source_route must be set to "0"
net.ipv4.ip_forward must be set to "0" (zero)
icmp_echo_ignore_broadcasts must be set to "1"
net.ipv4.tcp_syncookies must be set to "1"

[code].....

View 9 Replies View Related

General :: Receive Files Sent As A Parameter?

Feb 26, 2011

as $1 $2 represent first and second argument..for example- in a shell script..../commfile file1 file2 file3 now in commfile i want to receive files by running a loop...like

for (i=1;i<$#;i++)
do
cat ${i} //help me here
echo do u want to proceed

[code]....

View 9 Replies View Related

General :: Eliminate Error When No Parameter Is Supplied?

Apr 23, 2011

I am familiar with bash, but my works require csh. in my .cshrc, I created this alias:alias cd 'cd !:1; ls -l' It works very well except for one case: when I cd without any parameter:

cd In which case, I get the "Bad ! arg selector" error. How do I eliminate this error?

View 1 Replies View Related

Ubuntu :: Changing Console Resolution Without Vga Parameter?

Mar 4, 2010

Let's start with some context: About a week ago, I saw in the university computer that the text mode consoles(ctrl+alt+f[n]) worked with a great resolution on a 19" wide screen (I think it is 1440x900) running fedora 11. So I wondered if I could make the text consoles at home to work with a good resolution also.So I started to search for that and found the kernel parameter vga= . The problem: it doesn't support 1440x900 or any other 16:10 resolution for my graphic card. Then I thought that maybe fedora uses some module that allows that, because the livecd allows a good resolution (by default) on my desktop computer.

What I thought so far is that fedora is not using vesa for the virtual console (which i think is the driver that ubuntu uses) and I want to know what driver it is and how to use it in ubuntu (either compiling the kernel or simply installing something).I don't even know if my guesses are right or not. But I've gathered some info so far:From /var/log/messages (fedora 12 livecd) I got this part, which I think is the really interesting one.Quote:

Mar 2 22:37:18 localhost kernel: [drm] Initialized drm 1.1.0 20060810
Mar 2 22:37:18 localhost kernel: [drm] radeon defaulting to kernel modesetting.
Mar 2 22:37:18 localhost kernel: [drm] radeon kernel modesetting enabled.

[code]...

View 2 Replies View Related

Ubuntu Installation :: How To Add A Kernel Parameter In Grub2

Apr 16, 2010

I have not dug into Ubuntu for almost a year now (Since Jaunty, really). I am trying to come to grips with Grub2, but have just now encountered it in Lucid. I am having a terrible time with the graphics chipset, and it may well be that Ubuntu cannot be used on this computer (an older laptop with the dreaded Intel 82845G graphics chip). There are a number of older bug reports that it is unsupported, but some success in more recent versions.

Anyway, one suggestion has been to add i915.nomodset=1 to the kernel boot line. Now, this was a cinch in Legacy Grub, but I have been reading Grub2 wikis and tutorials for two days now, and I know about the config files, but I cannot find anything which tells me specifically how to add a parameter to the kernel boot line.

View 2 Replies View Related

Ubuntu :: Shell: Dirname With Variable As Parameter?

Jul 31, 2010

Code:
a=/this/is/a/dir.txt
dirname $a

[code]....

View 2 Replies View Related

Ubuntu :: Boot Parameter Meanings And How To Implement

Jan 23, 2011

There are several boot parameters shown when pressing the F6 key on the Ubuntu Maverick Alternate install CD. For example: ACPI=OFF

NOAPIC
NOLAPIC
NOMODESET
EXPERT MODE

Where do I find a "complete" explanation of what these parameters do, when it is appropriate to select them and HOW to select them?

View 8 Replies View Related

General :: What Are Implications Of Using 'noapic' Kernel Parameter?

Aug 4, 2010

I recently enabled noapic on my laptop because it was experiencing strange input freezes on several distros that I tried.Ok, so it does not use the ioapics. My question is, what does this mean for the system? If it used apics before, what happens now? I am a freshly graduated computer science major, and I have worked with basics pics on projects before, but I am curious how this effects the running system.

View 2 Replies View Related

Hardware :: Webcam What Kernel Parameter To Select?

Apr 20, 2011

I have a "Chicony 1.3M UVC Webcam (Asus G1S notebooks)" webcam, which is supported by Linux UVC [1]. However I'm unable to find the kernel parameter that I should select to compile my kernel to support this device.

View 1 Replies View Related

General :: Bash Variable As Parameter To Script?

May 10, 2011

I want to create a variable that when passed as a parameter to another bash script will keep its string quotes (so it stays as one parameter). What ways can I achieve this cleanly?

Code:

john@ubuntu:/usr/local/src$ cat foo.sh
#!/bin/bash
echo $0

[code]....

View 8 Replies View Related

General :: Pass Response As Command Parameter?

Mar 10, 2010

I have a backup schedule running a full backup everyday. I'm using webmin to manage these backup now. The problem is when the dump command sends a prompt asking if we want to rewrite the tape, Webmin does not display this prompt and we end up having to terminate the backup -> erase the tape(which takes a long time) and then run the backup again.I was wondering if there is a technique that could be used to pass "Yes" as a parameter to the dump command, much like in windows? or if there is a more efficient way of getting this done.

View 2 Replies View Related

General :: Set Parameter At The Boot Command Line?

Aug 20, 2010

I am following an instruction on the Internet to set up a timer=1. "You can force use of the timer interrupt by using the timer=1 module arameter (or oprofile.timer=1 on the boot command line" When I type "modprobe oprofile timer=1" at the command line, I got a warning message saying that "Deprecated config file /etc/modprobe.conf" So i want to try other way by setting it at the boot command line.

View 2 Replies View Related

General :: What Is Default Kernel Parameter Values

Mar 3, 2010

What is the default kernel paramtre valus for linux RHEL Machine?

View 5 Replies View Related

Security :: Failed Login Delay Parameter

Apr 27, 2010

Does anyone know a method for setting the timeout period for failed logins on Linux RHEL5.x systems? Linux docs say to set the failed login delay paramter in /etc/login.defs to the desired seconds. I did this, but the settings have no effect, ie weather set to 2,4,10, etc, the actuall failed login timeout period(which I verified with a stopwatch), never changes.

View 1 Replies View Related

CentOS 5 :: Kernel Parameter Available For Interrupts Handling?

Sep 16, 2010

Is there any Kernel parameter available for interrupts handling, In the case of busy server how we can tune the kernel to handle interrupts effectively.

View 4 Replies View Related

Debian :: Disable 3D Video Acceleration With Yahoo Parameter

Mar 13, 2016

My system is a 2.0Ghz Dual Core PowerMac G5 Ram 16Gb - 2Tb HDD - It is running Jessie 8.3 [new Install] and seems stable enough.....! My system is showing the message below on boot up, but I don't know why? I have had to disable the 3D video acceleration with a Yaboot parameter "nouveau.noaccel=1' to get the system to load KDE. I am also having some bluetooth headaches (along with many other people apparently).

# systemctl systemd-modules-load.service
Unknown operation 'systemd-modules-load.service'.
root@Apple-Desktop:~# systemctl status systemd-modules-load.service
● systemd-modules-load.service - Load Kernel Modules

[code]....

View 3 Replies View Related







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