/* * * Code derived and adapted from the Jitsi client side STUN framework. * * Distributable under LGPL license. * See terms of license at gnu.org. */ package org.restcomm.media.stun.messages.attributes.general; import org.restcomm.media.stun.messages.attributes.StunAttribute; import org.restcomm.media.stun.messages.attributes.address.AddressAttribute; /** * The MAPPED-ADDRESS attribute indicates the mapped IP address and * port. It consists of an eight bit address family, and a sixteen bit * port, followed by a fixed length value representing the IP address. * * 0 1 2 3 * 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ * |x x x x x x x x| Family | Port | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ * | Address | * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ * * The port is a network byte ordered representation of the mapped port. * The address family is always 0x01, corresponding to IPv4. The first * 8 bits of the MAPPED-ADDRESS are ignored, for the purposes of * aligning parameters on natural boundaries. The IPv4 address is 32 * bits. */ public class MappedAddressAttribute extends AddressAttribute{ public static final String NAME = "MAPPED-ADDRESS"; public MappedAddressAttribute() { super(StunAttribute.MAPPED_ADDRESS); } @Override public String getName() { return NAME; } }