how to set outbound_interface with ipv6 address? - boost-asio

I'm developing a multicast receiver. How to setup boost::asio::ip::multicast::outbound_interface for socket if my interface has ipv6 address?
According examples it should be ipv4: _socket.set_option( boost::asio::ip::multicast::outbound_interface(if_addr.to_v4()));

Unfortunately there is not good documentation for asio. I've found required information in sources:
_socket->set_option(boost::asio::ip::multicast::outbound_interface(ipv6addr.scope_id()));

Related

OVS Bridge Connectivity using GRE Tunneling

Okay so I'm trying to connect two OVS Bridges in separate hosts using GRE Tunneling. A VM is connected to each of the two OVS Bridges.
The problem is that I don't want to add eth0 to the bridges and don't want to give an IP Address to the bridges. The VM's have been given static IP's.
I've tries using multiple online tutorials. But what they all do is add eth0 to the bridges or etc which is of no use to me.
You do not have to add eth0 to the bridge.
You also do not have to give your bridge an IP, just set it to inet manual (or an equivalent in your config).
Could you please provide your current config? It would make much easier to give an advice.

how to get ipv6 address for ubuntu server

i have ubuntu server and i have ipv4 address to access that server.
have create API services for IOS application but not that ios application need IPV6 for calling that api. how to find that using command prompt.
so i am not able to get IPV6 from my server.
please help tp get ipv6 appdress.
thanks in advance
Does your hosting provider enable IPv6 for your server?
If yes, you should be able to read it using ifconfig - you look for your network interface and check the inet6 field.
Better, you add to your DNS an AAAA field, and use the url of your website to access the APIs. To change your DNS entries, please read documentation of your hosting provider.
ip -6 addr show then on inet6 you will find ipv6 address assuming you are using ubuntu 16.04 or newer

Configuring address and ports for JGroups

When using JGroups, with a component such as Infinispan, it is possible to configure the ports and addresses that JGroups will use.
http://www.jgroups.org/manual/html/user-advanced.html
For example:
<UDP
mcast_addr="${jgroups.udp.mcast_addr:228.6.7.8}"
mcast_port="${jgroups.udp.mcast_port:46655}"
...
But here is what is confusing me. How can all members of the cluster all use the same port, addr?
I would have thought each member would have its own port and have to know the ports (and addresses) of the other members it needs to talk to?
Thanks
Multicast is a special address that can be used by multiple nodes to send/received data - think of it like 127.0.0.1, which is also available on most boxes with network installed.

UDP how can two computers on separate networks connect to each other?

How can two computers that are on separate networks connect to each other using UDP? I know that you can do this by setting up port forwarding but I services like Xbox Live don't work through that. How is this possible and is there a way to obtain an address to another computer on a separate network?
EDIT
Ok thanks for the help I am using objc so I ended up using asyncsocket and portmapper for doing router configuration.
http://code.google.com/p/cocoaasyncsocket/
http://www.codingmonkeys.de/portmap/
First, obtaining the public IP of a remote computer:
Use dynamic dns.
Make your own protocol and run a server to keep the list of users and IP.
Working out incoming UDP packets:
Use client/server communication instead of peer-to-peer.
Use UPnP protocol (i think xbox does this) to ask your router for a port. Not all routers support or have UPnP enabled.
Use TURN/STUN protocol. This protocol has been designed to bypass UDP nat. This requires an external server, but there are free servers available.
I think there are libraries for UPnP and STUN, but i can't tell you for sure.
LatinSuD are right, STUN is good solution - check out STUN protocol implementation for iOS https://github.com/soulfly/STUN-iOS

How to write simple SMPP server

I want to write a simple SMPP Server that basically forwards traffic to another SMPP server (C#, PHP). What are the things I need to know? How do I proceed?
With regards to Goran's comment, one possible solution would be a simple tcp proxy such as simpleproxy.
From the Ubuntu package description:
simpleproxy acts as a simple TCP proxy. It opens a listening socket on
the local machine and forwards any connection to a remote host. It can be
run as a daemon or through inetd.
Olaseni,
I've done something similar in the past, but i used perl. What i did was taking a port forwarding proxy which i downloaded from accordata.com. (port-proxy.pl)
I modified this to use the NET::SMPP module to validate PDU's when reading the incoming socket. Once the PDU was of type "Bind_request" i would validate against a dbase, replace credentials if validation was successfull and than forward or if credentials were not validated, issue a reject to the client and disconnect. Alternatively if the PDU contained anything else, i would forward using the logic that was already existing in port-proxy.pl.
You can write simple smpp lib and forward smpp traffic from many applications to the one smpp connection to the sms provider
I can advice you jsmpp lib, but it's for java. It's very simple and cool lib. Many low level things happen behind the scenes and you can focus on your business logic
Find more here
I have written exactly what you are asking for in vb.net
What i did was listen for inbound PDU (connect, bind, sms, and disconnect too) identifying each inbound connection uniquely - for the authentication bit,
then i forward the traffic onward to the delivery smsc.
Your SMPP service simply needs to listen for inbound PDU packets... as well as send heartbeat packets to the connected clients, if required.