Programming :: Getting Multicast Address From Recvfrom

Mar 1, 2010

I'm using at struct sockaddr_in to receive multicast data sent out from another machine. When I print out the source address using inet_ntoa it gives me the source address of the PC that sent the data. This is ok but I would like to know if there is a way of getting the multicast address that the data was 'sent to'. I know I can see the multicast address in tcpdump being directed to my PC but I would like to be able to display the multicast address too? Is this possible or does the sockaddr_in give me the source address of the packet not the multicast address that the packet was sent to?

View 1 Replies


ADVERTISEMENT

Programming :: IPv6: Using Results From Recvfrom()

Jul 25, 2011

I have a socket library that I tinker with from time to time. Lately, I decided to expand it to support IPv6.

One of the issues I am having is sending data, using sendto(). When the server receives data from a client, using recvfrom(), it does not retain the sockaddr_in information, but instead provides the callee the IPv6 address and port number from where the data originated. See here:

Code:
int
UDPSocket::recv(char* buffer, size_t bufferLen, std::string& sourceAddr, unsigned short& sourcePort)
{
sockaddr_in sin;
socklen_t sinLen = sizeof(sin);

[Code]....

View 8 Replies View Related

Networking :: Mapping Ethernet Multicast Address?

Nov 23, 2010

have a doubt about the multicast address.I have read that IP and ethernet multicast address have the same last 23 bits. While an ethernet multicast address always starts with 01:00:5E. Changing the last 23 bits of the IP address into hexadecimal form and "adding" them to the first 24 bits we find the ethernet address but what about the missing bit??? For istance I have: 230.11.111.10 = 11100110.00001011.01101111.00001010 So converting the last 23 bits I have b:6f:a The final ethernet address will be 01:00:5E:b:6f:a . And what about the missing bit?

View 1 Replies View Related

Red Hat / Fedora :: Install Cluster On Servers - Validate A Multicast Address Before Using It?

May 19, 2011

I am trying to install a Red Hat cluster on my servers. In order to configure an heart bit between the servers I must give a valid multicast address. I wanted to know if there is a way to validate a multicast address before using it. For example if it is already in use i don't want to use it.

I read a little about it and there is a Perl module called IO::Socket::Multicast: [URL] There is a tool called mcasttrest.pl: [URL] Oracle use it to test multicast. But I am not sure what will do the trick in Red Hat cluster.

View 1 Replies View Related

General :: Setup Virtual Machines To Be Servers With Bind Option Set To A Multicast Group Address Of 225.0.62.87?

Mar 28, 2010

I am in verse to test "Multicast Packet filtering".I want to setup Virtual Machines to be servers with bind option set to a multicast group address of 225.0.62.87.Then I want to configure the client VM, connecting to the multicast group address and setting the TTL as needed.

View 3 Replies View Related

Networking :: MULTICAST Address And Port - Socket Listen Only On Port?

Feb 12, 2009

I make an application on GNU/Linux which listening on a MULTICAST stream, so I open my unconnected socket, bind it on a MULTICAST address and a port, join the multicast group with the "setsockopt (IP_ADD_MEMBERSHIP)", then I receive datagram on my socket.

Now I've two different instances of the same application that run with their own MULTICAST address and port. And what I found strange is that, after a misconfiguration, I switch the ports, for example:

Emitting on 225.0.0.1/23451 and 225.0.0.2/23452
Receiving on 225.0.0.1/23452 and 225.0.0.2/23451

And my receiving part doesn't care about the MULTICAST address, it looks like the socket is listening on the port number only! I mean that the receiver [225.0.0.1/23452] take its datagrams from emitter [225.0.0.2/23452] and vice-versa!

View 2 Replies View Related

Programming :: Pass Ip Address, Port Address And Some Parameters From Command Line?

Apr 1, 2011

I want to pass ip address,port address and some parameters from command line using python script.The ip address and port address for establishing socket connection and remaining parameters to execute different connection.

View 1 Replies View Related

Programming :: Shared Memory Address Area In Process Address Space?

Feb 21, 2011

if i attach a shared memory to my process whch part of the address space it will add(like stack, heap, data, code...).

View 3 Replies View Related

Programming :: Physical Versus Virtual Mac Address And Mac Address From NIC's Firmware?

Apr 6, 2011

I need a small shell based program that prints the mac address of physical ethernet adapter from it's firmware. I need this utility for license generation and appliance activation. I have tried several example but none of them is flawless, The easiest method I have found is to parse the output of "ifconfig" command but it has also some drawbacks.

1. Firstly program should differentiate between physical and virtual adapters. Physical means installed on board(wired or wireless) or installed additionally. Virtual adapters are those created by VPN or created by virtualization apps such as VirtualBox/VMWare etc. I am not interested in virtual ones.

2. In case of more them one physical adapters(wired and wireless), it should print the mac address and description(name & vendor) of both/all adapters.

3. If media is disconnected then also it should be able to read the mac address and description(name, vendor) of card.

4. This one is bit complex. I know that 'ethtool' can show you the universal mac address but it's limited to use only 2 types of drivers and won't work in all cases.

View 2 Replies View Related

Programming :: Translate Virtual Address To Physical Address In Application?

Nov 18, 2009

I want to translate the virtual address to physical address in linux C application, how to do that?

View 1 Replies View Related

Networking :: Server Stuck On Recvfrom And Client Waits On Receive

Apr 1, 2010

I have a problem with a simple client/server socket program. the connection is done through 2 connections a udp connection and a tcp connection. the flow is that the client sends a udp packet to the server and the server returns it through a tcp connection. this is done in a loop. my code works fine on an ubuntu server, when I try to use it on redhat it sometimes get stuck. the server is stuck on recvfrom and the client waits on the recv. if i add a delay in the server or run the client through strace everything works fine.

[code]...

View 3 Replies View Related

Programming :: Access At Physical Address - I/O Address In My Map Memory?

Dec 17, 2008

When I try to access at physical address (0xD0000), we known that it is necessary to convert physical address to virtual address using function IOREMAP(0xD0000, 1024) and return me 0xC00D0000.

Now our doubt is when I have a board with I/O in address 0x150, is it necessary to convert this address to other virtual address??? or with inb(0x150) return me state of I/O in this address? How can I known where is this I/O address in my map memory?

View 7 Replies View Related

Programming :: Find The Mac Address For A Given Ip Address?

Feb 16, 2010

I am trying to find out the mac address of the eth0 port on linux probe. This port is controlled by kernal and hence I don't have control over it. How do I find out the mac address of this port ? Is there any system call which will take the ip address and will do the lookup on the linux's ip table to get the mac address ?

View 6 Replies View Related

Programming :: The IP On The Second Address?

Sep 24, 2010

when i do nslookup by name (loop2) i get the followings:

Code:
#nslookup loop2
server: mainsrv-local.local

[code]...

View 6 Replies View Related

Programming :: How To Get Gateway Address

Nov 18, 2010

you know ,we can get a Iface's MAC Address,IP Address,NetMask by function ioctl(), But how Can I get a Iface's Gateway by ioctl or other funciton!

View 5 Replies View Related

Fedora :: How To Enable Multicast Forwarding

Jul 22, 2010

I have a server that sits between two LANs, and I wish to enable multicast routing from one LAN to the other. I have multicast routing enabled in the kernel but didn't know how to enable it. Tried to add mc_forwarding in /etc/sysctrl but doesn't work.

View 3 Replies View Related

Ubuntu Networking :: Not Able To Get Multicast Working

Sep 1, 2010

I have several multicast data feeds that I'm trying to connect to using a minimal server install of Ubuntu as a VM on a VMWare ESXi server.I have another VM on the same server running Solaris that can connect with no issues to the incoming multicast stream.

View 1 Replies View Related

Networking :: Converting IP Multicast To MAC LLC Broadcast

Mar 5, 2010

This is not a linux specific question more of a general network issue with the hope that someone may have already done this under linux.My problem:I have a red hat linux machine transmitting IP multicast packets onto an ethernet gigabit network (cisco switch).Wireshark (running on a different red hat linux box confirms packets on network.

View 4 Replies View Related

Networking :: Multicast With More Than One Network Interface?

Jul 30, 2010

If I have set up 2 network interfaces on a box, if I started sending multicast traffic, it will go out through both interfaces? Or is there a way to control through which interface it will go out?

View 1 Replies View Related

Software :: Joining Multicast IP Group?

Dec 14, 2009

How can i make my device join a multicast IP group.My target device is in linux

View 2 Replies View Related

CentOS 5 :: Any Tool That Can Test Multicast?

Aug 1, 2009

I am trying to search a tool for testing multicast. Currently, 'yum search multicast' yields nothing. I saw mcsender and mctest in google but they seem not to be supported in CentOS. Do you know any tool that can test multicast?

View 3 Replies View Related

Programming :: Compress Ip Address Ranges?

Sep 19, 2010

I've googled til my brain went boom... So the short story goes; I have lots of ip address ranges in multiple files which need to go into an iptables firewall... Sounds simple right?

Example of files:
1.0.1.0-1.0.1.255
1.0.1.0-1.1.0.255

[code]....

View 3 Replies View Related

Programming :: Extract URL From Firefox Address Bar ?

Nov 27, 2010

I'm trying to create an application that monitors, among other things, what site the user is currently viewing. I would like to know if there is any way to get the current URL from the Firefox's address bar on a Linux machine. I know that under Windows I can use the DDE server approach, but under Linux this task is proving very tricky. I've considered an approach involving an extension to Firefox, but this would require the user to install the said extension himself. Which is not something I want. If an extension can be installed by a different program's installer than that could work, but I don't know if that's possible or not.

View 14 Replies View Related

Programming :: Change MAC Address Via C Code?

Apr 12, 2010

I need a way to change the machine MAC address via a C code in linux. Ive find a way to retrieve it but not to change it.

View 4 Replies View Related

Programming :: Get The Ip Address Of The Client Machine?

Jan 2, 2011

I am connecting to linux server(RHEL4.7) using putty from my windows machine. Is there any way to get the ip address of my windows machine using C program in linux.

View 9 Replies View Related

Programming :: Packing Sockaddr_storage With Either V4 Or V6 Address?

Mar 29, 2011

Running into a weird issue when packing sockaddr_storage with either v4 or v6 address.

To demonstrate the problem, I created a sample test program(limiting it to v4 only addresses). The problem was observed on MAC OS 10.5.8 and Linux RHEL kernel 2.6.9-42 with gcc as the compiler.

* Function packAddrs() runs a for loop packing v4 addresses into a single structure. The input address is same for every iteration, output memory size is adjusted using realloc.

* After successfully packing an address, it prints the packed structure contents using displayPackedAddrs()

* The output is fine for first two iterations. However, at the 3rd iteration, the packed contents seem to have got corrupted. It prints only the first packed address. I have tried using (malloc and memcpy) instead of realloc but no improvement.

Included below is the code and execution output.

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

[code]....

View 1 Replies View Related

Fedora :: Any Tool To Record UDP Streams (multicast) In 10 ?

Oct 26, 2009

finding a tool to record udp:// streams that are multicasted.

View 1 Replies View Related

Fedora X86/64bit :: 14 Cannot Play More Than 1 Multicast Stream

Aug 17, 2011

I have a project to run simultaneously up to 8 video streams, from a pool of about 100 multicast cameras, and display them on 4 monitors. The PC I am using is a brand-new dual CPU 4-core Intel Xeon E5620 2.40GHz, Intel S5520SCR motherboard, 8GB memory and nvidia Quadro NVS 450 graphics. It's running Fedora 14 64-bit and outputs on 2x2 LCD monitors using Xinerama. So far, so good.

Playing a single video stream from any camera works fine. The problem is that, when I open a 2nd media player window with the purpose of playing other camera, all those two video windows play a single stream. It doesn't matter which camera stream I opened first, as soon as I open a 2nd stream, both windows show the same stream (either the first, or the second, at what seems to be a random choice). Further, a 3rd or a 4th video window will also play the same stream. In other words, one stream sort of "contaminates" all the other streaming windows to play that particular stream only. The problem remains the same even when the following changes are applied:

- graphics driver: nvidia or nouveau;
- video player: vlc or mplayer;
- number of active monitors: 4, 2 or 1.

I am really puzzled because, on the same computer, Windows XP SP3 32-bit runs beautiful. I can smoothly play up to 12 video streams and some computer applications, simultaneously. I cannot believe that an obsolete OS such as Windows XP can outperform by a long shot Fedora 14 64-bit in video streaming projects. Just doesn't make sense.

Note: I have also tested Windows 7 64-bit, it also runs multiple video streams in parallel without any problems, but Win 7 has issues that XP is free of (such as graphics output glitching every few seconds).

View 1 Replies View Related

CentOS 5 :: Finding A Tool For Testing Multicast?

May 11, 2011

I am trying to search a tool for testing multicast. Currently, 'yum search multicast' yields nothing. I saw mcsender and mctest in google but they seem not to be supported in CentOS. Do you know any tool that can test multicast?

View 3 Replies View Related

Ubuntu Networking :: Unable To Receive Multicast?

Jun 23, 2011

For the last couple of days, I've been unsuccesfully trying to receive multicast packets on Ubuntu Server 11.04, and seen some strange things along the way. The program i use to test this, is basically http://www.scribd.com/doc/38224328/mcreceive-c.Now the network has been configured to forward me the multicast packets, regardless of the joins. So tcpdump shows me:

Code:
15:16:11.308952 IP 10.164.130.2.61417 > 224.16.17.23.47806: UDP, length 1400
...

[code]....

View 2 Replies View Related







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