Programming :: C++: Broadcast Receives No Answer
Dec 22, 2010It could run on my computer. But there is no result.
[code]...
It could run on my computer. But there is no result.
[code]...
How can I set the outgoing port for the socket? In wireshark, my outgoing port is 1024, and i want to set it to 6800 (or a similar port) I see the outgoing broadcast-message in wireshark, but no answer. There are three ECU's in the LAN, which should answer. The following code is a mixture of C/C++ and jointed from different articles:
[code]...
In wireshark I can only see the outgoing message. But the "recvBuffer" (in the lower part of the code) contains the same content as the sendBuffer. Is it right, that I need a sender and further more a receiver? Or should I receive the broadcast-answer on the same socket on which I send the bc?
I have a problem with the last point of some homework I have for an OS class. I need the program to print the pid upon execution, then for 10 seconds react to SIGUSR1, SIGUSR2 and SIGTERM. If either USR1 or USR2 is received, the 10 seconds are reset. Some of the functions I'm told to use are alarm(), pause() and signal(). The nicest way I found was to handle SIGUSR1, SIGUSR2 and SIGALRM in the parent process, with SIGALRM killing the child (with a SIGTERM). In the child a pause() (or for(; pause() would be enough for it to be alive until killed from the SIGALRM handler in the parent.
What I found is that I can't just do a wait() in the parent process, waiting for the child to be killed, since whenever the parent receives a SIGUSR1 or SIGUSR2, the right handler is called but the child exits nicely. I tried blocking/ignoring those signals in the child, since the default behaviour for SIGUSR1 and SIGUSR2 is to terminate the process, but the result is the same. The only way I could do it is using a waitpid() within a do { } while(!WIFSIGNALED(status)) since when the child gets killed with the parent's kill(), it's WIFSIGNALED, whereas when it exits after the parent handles a SIGUSR1/2, it's WIFEXITED.
P.S. What I'm doing to achieve the expected 10s window is calling alarm(10) in the parent process and again within the SIGUSR1/2 handlers. In the SIGALRM handler I kill the child and within the child I simply do a for(; pause()
i m using atoi() to convert char value to int. and then passing that int as a swtich variable.switch goes in a case and exectuing that particualr function but returning 0 value....for example: i am finding no of process() and system up time().when switch program goes in system up time it gives right values means correct no of days, hrs , min and sec but when it goes in no of process() it gives 0 answer.
View 8 Replies View RelatedFriends i have an idea to broadcast few local TV channels to the world via internet.But friends i can't directly broadcast from my country because of bandwidth.friends is there a way to do this through a remote server server? i just need to input my stream to a remote server and then broadcast it from the server.I can stream channels to the server from my country through a 10mbbs connection.
View 2 Replies View RelatedI am trying to write little quiz to give different answer when given yes or no reply, however I got stuck with this. I am very very new to Python so please have patience. Can someone give me a sugesstions?
This is my code so far:
name = raw_input("
What is your name")
print "
Hello, " + name + "."
[Code]...
Code:
tupe=("File",("Open","Open a file"),"Edit",("Cut","Cut a file"),("Paste","Paste a file"),"About",("About","About the program"))
menutitle=""
menupos=0
for items in tupe:
if type(items)==str:
[Code]...
I'm trying to understand how to make "File" be the parent information for "Open","Open a file" and "Edit" to be the parent of "Cut, Cut a file" and "Paste", "paste a file". Does anyone have a suggestion for accessing the a nested tuple in this manner? The above code does not quite do what I want it to. The above code is for visual purposes, but I'm learning how to refactor for wx.python.
I'm trying to create an SSL certificate and answer the questions inside a bash script. The command used to create the SSL certificate
Code: openssl req $@ -new -x509 -days 365 -nodes -out /etc/apache2/apache.pem -keyout /etc/apache2/apache.pem
The first question asked is. Country Name (2 letter code) [AU]:
I have a doubt about signals in C programming. I have done this little program to explain it. It creates a child process with fork and, when the child ends, receives the SIGCHLD signal and wait for its termination.Ok, quite easy, BUT when I execute this code the SIGCHLD signal is received twice, first as an error (returns -1) and the second one to finish the child process.I don't understand the meaning of the first received signal. Why is it generated? Is the code wrong? (if you add the SIGINT and press Ctrl+C during the execution it also receives two signals instead of one)
Code: #include <stdio.h>
#include <unistd.h>
#include <string.h>
[code]....
I have a simple BASH script that I want to make it execute USERNAME and PASSWORD to another bash script and htdigest. But After passwd, with htdigest and the script rustart, I have to manual enter the answers.
#!/bin/bash
echo -n "What is the user name?"
read -e USERNAME
[code]....
Quote:
This will ask me for username and password, but I want it to take the username and password from $USERNAME and $PASSWORD
service rustart restart
Quote:
This script needs a username to restart another exec, but I don't wana have to manually type in the username, I just want it to automatically fill in the $USERNAME
I created three pop accounts in evolution. For jka-walgau.at my name, office and mobile. The first time everything ran ok (all new mails could be downloaded, and from each account mails could be send). After a day (iIset the computer up for a friend) there arent no new mails that come in (webinterface tells me there are new ones).
SSL for pop and TLS for smtp were set.
The problem is they are selfsigned certificates. The first time when I configured the accounts and clicked the button to test the authentication methods I got a warning (self signed) no button to add this cert permanently only a OK buttton and in the upper corner the (x) to close. How should I handle this problem.
Does anybody know any useful free software for SMS Gateway (like OZEKI software under windows) for linux that receives sms via GSM modem convert it to mail and/or fax and visa versa and has web base configuration GUI?
View 3 Replies View Relatedi have ipA -> web server
and ipB -> mail server
when i send a mail from outside the user receives it but when i send it from my web server in mail logs i get the following error
relay=[127.0.0.1] [127.0.0.1], dsn=5.1.1, stat=User unknown
I'm trying to connect to a Cisco VPN at work from Ubuntu 10.10. On earlier versions, I was able to import the config and get it working. In 10.10, though, the best I've gotten is being able to connect to the VPN, see the welcome message, and have packets sent over the tunnel. I don't receive any packets, though.
The command-line vpnc client connects just fine. I found this bug report: [URL]
The symptoms it describes are exactly what I'm seeing. The apparent solution is to "make sure in your config that LZO Compression is enabled (checked) under Advanced"; however I see neither an option for compression nor an "Advanced" tab, button, or anything on my VPN config in Network Manager.
I have two DNS servers, one local and one remote, and I am trying to get them to talk to each other using views.
The problem I'm having is that the remote server can talk to the local one and receive zone files, but if I update the local server internal view, the remote doesn't receive the update. Here is my config:
Quote:
key "external" {
algorithm hmac-md5;
secret "xxxxx";
};
controls {
inet 127.0.0.1 allow { localhost; };
[Code]....
I'm running a cobalt raq550 web server (Linux version 2.6) and I want to install a syslog program on it, something that could log messages and send me an instant email in response to certain messages it receives. Is there such a program?
View 6 Replies View RelatedI've been googling around and can't seem to find my answer. I've got an old ATI 9700 pro that I'm removing from my system. I'm replacing it with an Nvidia GeForce 6200. What do I need to do to switch these in Karmic? I tried switching the cards, but I only get a white screen with the pointer on the new card. I can't do anything else. I'm guessing I have to uninstall the open source ATI driver first. How do I do that?
View 1 Replies View RelatedWhen I connect to ssh server ( server running Redhat ) from debian it takes a long time to give me the prompt, while I receive the prompt rapidly when I connect from slackware or solaris?
View 9 Replies View RelatedI have a VPS CentOS 5.5 32 bits. It does not answer any DNS request made to the server.
I need to configure Bind to answer these requests.
I have been reading about that for several days and here: [URL]
But it is uncompleted.
I need to configure these too:
chroot DNS with BIND avoid cache poisoning avoid being an open resolver port randomization
I have found several tutorials but all of them have different points of view.
I am looking for a good tutorial that has everything:
Setting up bind on CentOS 5.5 chroot DNS with BIND avoid cache poisoning avoid being an open resolver port randomization configure iptables for bind
I'm trying to sed out X and Y coordinates from a identify command. I get back from the identify:
Quote:
1015x638+0+0
I need:
Quote:
1015x638
[Code]...
system:
Opensuse 11.1 with custom kernel from Kernelorg and KDE3.5
Code:
uname -a
Linux linux-2c5j 3.0.4-41-desktop #1 SMP PREEMPT Sun Sep 4 18:51:01 CEST 2011 i686 i686 i386 GNU/Linux
The device is correctly visible:
Code:
lsusb
Bus 002 Device 003: ID 05c6:9204 Qualcomm, Inc.
Bus 002 Device 002: ID 8087:0020
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 006: ID 046d:c012 Logitech, Inc. Mouseman Dual Optical
[Code].....
The modem responds with O.K if interrogated in kppp but the response on AT are not there. It does not dial. The modem has been installed as dev/tty/USB0I did compile Gobi loader 0.7 and it did run make and make install without error. The gobi rules are correctly installed and I did copy the firmware in the respective directory. The problem is: did I copy the right firmware? Is there some other problem. How can I diagnose if the firmware is the correct one (I unpacked the windows ones on a windows machine and there are 6)? I do not see usb0 offered by networkmanager (the network traffic is regulated through networkmanager).
Is there a way to make apt-get install answer "yes" to the "Do you want to continue [y/N]?"?
View 5 Replies View RelatedI've done a bit of googling, but can't find a clear answer on this. If I format a USB drive using NTFS, so I can store copies of files from my Win 7 machine and my Lucid machine, will it work.
View 9 Replies View RelatedWhen I type 'nslookup some site',the result I always get is a non-authoritative answer. How can I get an authoritative answer?
View 3 Replies View RelatedMy test box is running 9.10 desktop,bind,dhcp,LAMP. Everything is working good, except for one thing. How do I configure the DNS to answer the IP of eth3 (192.168.0.2), no matter what the client asked for? If you ask my DNS for google.com, I want it to return 192.168.0.2. I know this can't be that hard, I just can''t figure it out.
View 4 Replies View RelatedI wanted to know how can I make fsck automatically fix HDD errors when it needs to check HDD during boot up and do not ask user for it . I found some of fsck related scripts in /etc/init/ and /etc/init.d/ but I don't know what to do with them.
View 7 Replies View Relatedtried a lot to get an answer for howo check when a user was created,but got no answer. know the command or how to check when a user was created?
View 14 Replies View RelatedI am having issues getting the modem it the dial-in server I have set up to answer on the correct ring. I have the /etc/inittab set:
Code: S1:2345:respawn:/sbin/mgetty -n 7 -x 6 -D ttyS2 yet I have to play with 'init q' and minicom to get it to answer on ring 7. Then a reboot destroys the setting and I have to go through the whole hassle again and it goes back to answering on the first ring.
This is not acceptable. This dial-in server is only a very back door into my network. It is only turned on when needed. Most of the time it is not powered up. When it is turned on it is by a non-tech person with out the ability to jump through the hoops to get it to answer on the correct ring.
Ideally I want this modem to just listen to the line after it stops ringing to check for a data signal and if it does not find it just hang up. If it finds a data signal then establish a connection and all that. That way it does not interfere with answering machine on the line. Google has yielded very little info about setting up dial-in servers. Modems are not used very much any more.
I have been looking for a while and I am unable to find an answer to yum segfaulting.
I have tried:
yum clean all
rm -f /var/lib/rpm/__*
rpm --rebuilddb
I tried upgrading yum and rpm to the newest versions in 5.5 and I still run into the same problem.
fcntl64(6, F_SETLK64, {type=F_RDLCK, whence=SEEK_SET, start=1073741824, len=1}, 0xbfcaf694) = 0
fcntl64(6, F_SETLK64, {type=F_RDLCK, whence=SEEK_SET, start=1073741826, len=510}, 0xbfcaf694) = 0
fcntl64(6, F_SETLK64, {type=F_UNLCK, whence=SEEK_SET, start=1073741824, len=1}, 0xbfcaf694) = 0
access("/var/cache/yum/base/primary.xml.gz.sqlite-journal", F_OK) = -1 ENOENT (No such file or directory)
fstat64(6, {st_mode=S_IFREG|0644, st_size=20480, ...}) = 0
[Code]...
When I try to connect to my PC with sftp, the connection closes right away. Connect with ssh works flawlessly, and so does fish:// ! I run openSUSE 11.1
[Code]....