#include "linden_common.h"
#include "net.h"
#include <stdexcept>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <fcntl.h>
#include <errno.h>
#include "network.h"
#include "llerror.h"
#include "llhost.h"
#include "lltimer.h"
#include "indra_constants.h"
Include dependency graph for net.cpp:
Go to the source code of this file.
Functions | |
LLHost | get_sender () |
U32 | get_sender_ip (void) |
U32 | get_sender_port () |
const char * | u32_to_ip_string (U32 ip) |
char * | u32_to_ip_string (U32 ip, char *ip_string) |
U32 | ip_string_to_u32 (const char *ip_string) |
S32 | start_net (S32 &socket_out, int &nPort) |
void | end_net (S32 &socket_out) |
int | receive_packet (int hSocket, char *receiveBuffer) |
BOOL | send_packet (int hSocket, const char *sendBuffer, int size, U32 recipient, int nPort) |
Variables | |
sockaddr_in | stDstAddr |
sockaddr_in | stSrcAddr |
sockaddr_in | stLclAddr |
const char * | LOOPBACK_ADDRESS_STRING = "127.0.0.1" |
const int | SEND_BUFFER_SIZE = 400000 |
const int | RECEIVE_BUFFER_SIZE = 400000 |
Copyright (c) 2000-2007, Linden Research, Inc.
Second Life Viewer Source Code The source code in this file ("Source Code") is provided by Linden Lab to you under the terms of the GNU General Public License, version 2.0 ("GPL"), unless you have obtained a separate licensing agreement ("Other License"), formally executed by you and Linden Lab. Terms of the GPL can be found in doc/GPL-license.txt in this distribution, or online at http://secondlife.com/developers/opensource/gplv2
There are special exceptions to the terms and conditions of the GPL as it is applied to this Source Code. View the full text of the exception in the file doc/FLOSS-exception.txt in this software distribution, or online at http://secondlife.com/developers/opensource/flossexception
By copying, modifying or distributing this software, you acknowledge that you have read and understood your obligations described above, and agree to abide by those obligations.
ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, COMPLETENESS OR PERFORMANCE. $/LicenseInfo$
Definition in file net.cpp.
LLHost get_sender | ( | ) |
Definition at line 97 of file net.cpp.
References stSrcAddr.
Referenced by LLPacketBuffer::init(), and LLPacketRing::receivePacket().
U32 ip_string_to_u32 | ( | const char * | ip_string | ) |
Definition at line 160 of file net.cpp.
Referenced by LLHost::LLHost(), LLHost::set(), and LLHost::setAddress().
int receive_packet | ( | int | hSocket, | |
char * | receiveBuffer | |||
) |
Definition at line 475 of file net.cpp.
References NET_BUFFER_SIZE, and stSrcAddr.
Referenced by LLPacketBuffer::init(), and LLPacketRing::receivePacket().
Definition at line 370 of file net.cpp.
References llformat(), llinfos, llwarns, MAXADDRSTR, NET_USE_OS_ASSIGNED_PORT, PORT_DISCOVERY_RANGE_MAX, PORT_DISCOVERY_RANGE_MIN, RECEIVE_BUFFER_SIZE, and SEND_BUFFER_SIZE.
Referenced by LLMessageSystem::LLMessageSystem().
char* u32_to_ip_string | ( | U32 | ip, | |
char * | ip_string | |||
) |
const char* u32_to_ip_string | ( | U32 | ip | ) |
Definition at line 112 of file net.cpp.
Referenced by LLHost::getIPString(), LLHost::getString(), operator<<(), LLViewerImageList::receiveImageHeader(), and LLViewerImageList::receiveImagePacket().
const char* LOOPBACK_ADDRESS_STRING = "127.0.0.1" |
const int RECEIVE_BUFFER_SIZE = 400000 |
const int SEND_BUFFER_SIZE = 400000 |
struct sockaddr_in stSrcAddr |
Definition at line 71 of file net.cpp.
Referenced by get_sender(), get_sender_ip(), get_sender_port(), and receive_packet().