Igor Delovski Board Forum Index Igor Delovski Board
My Own Personal Slashdot!
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Networking

 
Post new topic   Reply to topic    Igor Delovski Board Forum Index -> General Programming
General Programming  
Author Message
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 3025
Location: Europe

PostPosted: Fri Aug 25, 2006 1:30 pm    Post subject: Networking Reply with quote

Header drawings for IP, TCP, UDP and ICMP

"Here are some drawings I did to better understand the structure of the
headers for IP, TCP, UDP and ICMP. Please feel free to used them for
personal use. There is no unique information here. Just normal RFC info
presented in an easy to read format. "
Back to top
View user's profile Send private message
delovski



Joined: 14 Jun 2006
Posts: 3522
Location: Zagreb

PostPosted: Sat Aug 26, 2006 9:33 am    Post subject: Reply with quote

At JoS: Writing Network Drivers

"Search for "tap tun win32 drivers" on your favourite search engine. It's
a standard driver on many Unix systems that allows you to write a VPN
without having to write drivers. There's a win32 implementation as well,
I'm not sure how mature it is."


UNIX Network Programming: Sockets Introduction,
by Andrew M. Rudoff, Bill Fenner, W. Richard Stevens

"This chapter begins the description of the sockets API. We begin with
socket address structures, which will be found in almost every example in
the text. These structures can be passed in two directions: from the
process to the kernel, and from the kernel to the process. The latter case
is an example of a value-result argument, and we will encounter other
examples of these arguments throughout the text."


Last edited by delovski on Mon Oct 02, 2006 2:52 pm; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3522
Location: Zagreb

PostPosted: Mon Aug 28, 2006 9:01 pm    Post subject: Reply with quote

1. Using a Mailslot to read/write data over a network

"A mailslot is a (temporary) RAM-based file to which numerous records
of data can be written and read by several computers on the same network
(i.e., domain). The chief advantage of using mailslots (to exchange data
across a network) over other alternatives such as WinSock, WinINet, etc, is
that a mailslot is incredibly easy to implement."


2. Simple Instant Messaging using MailSlots

"Mailslots are a message passing algorithm for one directional
communications. Using a small amount of code you can get a good start on
an IM client, without ever writing a server. My solutions presented here is a
rough prototype for building a mailslot based chat program. A good amount
of work will still need to go into it to really make an affective tool. But, if
you are willing to spend some time you could easily integrate a mailslot
chat program into an already existing MFC application."


3. MassMind: CreateMailslot()

"The CreateMailslot function creates a mailslot with the specified name
and returns a handle that a mailslot server can use to perform operations
on the mailslot. The mailslot is local to the computer that creates it. An
error occurs if a mailslot with the specified name already exists."


Last edited by delovski on Mon Oct 02, 2006 2:52 pm; edited 3 times in total
Back to top
View user's profile Send private message Visit poster's website
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 3025
Location: Europe

PostPosted: Tue Aug 29, 2006 6:58 pm    Post subject: Reply with quote

The CodeProject: Enumeration of Computer Names and their IP address

"This code snippet allows you to retrieve the names of the computers in
the network and their associated IP addresses. You can use this code to
retrieve the host information in a network and also get the IP address of
each pc. Its something similar to what you see in the Network Neighborhood
list."

(Same article over here: CodeGuru)

Getting the Physical (MAC) address of a Network Interface Card

"This article describes how to get the MAC or physical address of a
network adapter, and how to tell if an adapter is the primary adapter on
the system given its adapter (system) index. Finally, it shows how to get
the (array) index of the primary adapter."


How to get a list of users from a server

"I am in the middle of writing a multi-user application which has an
administrative component to define the users for the system and their
security access. Rather than have the system administrator enter the
users manually, I thought it would be nice to allow them to choose from
existing users of their network."


MSDN: DOCERR: CreateFile() and Mailslots


Last edited by Ike on Mon Sep 18, 2006 8:48 pm; edited 3 times in total
Back to top
View user's profile Send private message
Guest






PostPosted: Tue Aug 29, 2006 7:29 pm    Post subject: Reply with quote

Windows Networking (WNet) @ msdn - Enumerating Network Resources

"The following example illustrates an application-defined function
(EnumerateFunc) that enumerates all the resources on a network."



And some very nice code to read: WCI - Windoze Connection Interceptor

WCI is a simple connection interceptor for switched networks and especially for SMB.
* + ARP redirection/spoofing
* + automated bridging
* + automated routing
* + automated connection interception for ALL SMB servers in the local subnet
* + network cleanup on exit

Details:
* ARP requests are replyed by WCI with it's onw Ethernet address. The real
* destination is requested with ARP requests or is discovered from other
* broadcasst traffic.
* Intercepted traffic is bridged to the next hop gateway or the destination
* address according to a routing table.
* NEW:
* On startup, WCI enumerates all resources in the Windows netowking environment (SMB)
* and intercepts all possible connections (any2any).
*
*
* REQUIRES:
* - Packet Driver Developers Pack (http://netgroup-serv.polito.it/winpcap/)
* - Packet Driver installed
*
* Building on Windoze with VC 6 and the monster cool packet32.lib:
* - create a console application workspace
* - insert this file in the project
* - add path to packet32.h and packet.lib to your settings
* - make sure the project links with the following libraries:
* mpr.lib wsock32.lib libpcap.lib packet.lib netapi32.lib


mvps.org - WNetEnumResource

WNetOpenEnum(), with its companion functions WNetEnumResource()
and WNetCloseEnum(), iterates through a specific level of what NT4 and
Win95 users know as the "Network Neighbourhood". It can be called
recursively to drill down in the tree, and that is what this sample does.

Note that WNetEnumResource() does not list hidden shares; use NetShareEnum() for this task.
Back to top
XNote
Kapetan


Joined: 16 Jun 2006
Posts: 532

PostPosted: Wed Aug 30, 2006 12:56 am    Post subject: Reply with quote

"Select Computer" Dialog

"Actually I'm using the WNetEnumResource() function to enumerate
network resources. If an enumerated resource is identified as
RESOURCEDISPLAYTYPE_DOMAIN object I display it as a domain, and if
it's identified as RESOURCEDISPLAYTYPE_SERVER object I show it as a
computer. The name of computer and domain are read from the
lpRemoteName member of the NETRESOURCE structure."
Back to top
View user's profile Send private message
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 3025
Location: Europe

PostPosted: Fri Sep 01, 2006 5:50 pm    Post subject: Reply with quote

MSDN: Winsock Functions

"The following list provides concise descriptions of each Winsock function.
For additional information on any function, click the function name."


IANA: Port Numbers

"The port numbers are divided into three ranges: the Well Known Ports,
the Registered Ports, and the Dynamic and/or Private Ports."


Blog at MSDN: Windows Network Development

"Windows Network Development platforms, technologies and APIs such
as Winsock, WSK, WinINet, Http.sys, WinHttp, QoS and System.Net "


Last edited by Ike on Mon Sep 04, 2006 2:29 pm; edited 1 time in total
Back to top
View user's profile Send private message
delovski



Joined: 14 Jun 2006
Posts: 3522
Location: Zagreb

PostPosted: Sun Sep 03, 2006 8:51 pm    Post subject: Reply with quote

C Board: Failure to Retrieve Domain Name

"However, NetWkstaGetInfo fails when I attempt to run it from the
Startup routine of a Winlogon Notify dll. If I delay the execution it
succeeds. However if it runs without some sort of pause, it fails.

... It gives no indication of failure, however the domain name it acquires is
just an empty string if I do not include a pause."


And this one: Winsock Messaging Program

"I started making a simple messaging program. For testing purpose, i
tried to see if it would connect on my own computer, and it did. However,
when I try to have a friend connect to me from over the internet, things
get into a loop on my end (which is partially my fault for coding it that
way), and quickly returns an error on the client end."


So, just remember that function inet_ntoa() converts a network address
in a struct in_addr to a dots & numbers format string. The "n" in "ntoa"
stands for network, and the "a" stands for ASCII. It's Network To ASCII
like the standard C library function atoi().

And more: Setting timeout time...

"How to can I set the connect()ion timeout time?"

Or maybe: connect( ) timeout

"How do you go about setting the timeout for the connect( ) function?"


Last edited by delovski on Sat Oct 07, 2006 1:33 pm; edited 7 times in total
Back to top
View user's profile Send private message Visit poster's website
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 3025
Location: Europe

PostPosted: Mon Sep 04, 2006 2:46 pm    Post subject: Reply with quote

Netorking List at Apple: Macnetworkprog -- Macintosh Network Programming

"The Macintosh Network Programming list is a forum for developers to
discuss network programming on all versions of Mac OS. Specific topics
covered include network APIs (CFNetwork, CF/NSSocket, BSD sockets, NSL,
URL Access, Open Transport, MacTCP, classic AppleTalk), network setup
APIs..."


And at MacDevCenter: Networking and the BSD Sockets API

"Due to its Unix lineage, Mac OS X is a wonderful platform for learning
about networking, since it has such a rich set of APIs to offer; in particular,
we can program with the venerable BSD sockets API. Today we'll learn
about this API, and in doing so we will write a tiny pair of C applications
that demonstrate how clients and servers can be made to talk with one
another."
Back to top
View user's profile Send private message
Bumbar
Guest





PostPosted: Fri Sep 08, 2006 4:45 pm    Post subject: Reply with quote

C Board: Winsock recv problems

"The network does NOT guarantee that if you send "hello world" in ONE
send() call that you will receive "hello world" in a single recv() call."
Back to top
Fubar
Guest





PostPosted: Fri Sep 15, 2006 7:12 pm    Post subject: Reply with quote

Sockets Programming

A socket is a communication mechanism. A socket is normally idenitifed
by a small integer which may be called the socket descriptor. The socket
mechanism was first introduced in the 4.2 BSD Unix system in 1983 in
conjunction with the TCP/IP protocols that first appeared in the 4.1 BSD
Unix system in late 1981.


socket() create a socket
bind() associate a socket with a network address
connect() connect a socket to a remote network address
listen() wait for incoming connection attempts
accept() accept incoming connection attempts
Back to top
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 3025
Location: Europe

PostPosted: Mon Sep 18, 2006 9:27 pm    Post subject: Reply with quote

Holly Cow: IPCWorkshop

"The main objective of this application was to learn about the various
Inter Process Communication methods and how it can be used for data
transfer. ... For simplicity this demo application describes one way inter-
process communication (ie) from the client to the server. The server will
just listen to its clients. Here I have described 5 types of IPCs."

  1. Clipboard
  2. File Mapping
  3. Mailslots
  4. Named Pipes
  5. Sockets
Back to top
View user's profile Send private message
delovski



Joined: 14 Jun 2006
Posts: 3522
Location: Zagreb

PostPosted: Wed Sep 20, 2006 9:21 pm    Post subject: Reply with quote

PC to PC over the Internet

"I have two PCs connected to the Internet. None of them are web servers.
Is it possible to send data from one machine to the other over the
Internet?"
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3522
Location: Zagreb

PostPosted: Sat Sep 23, 2006 11:06 am    Post subject: Reply with quote

Xcode C++ Command Line 'tool' & Networking: Where to Start?

Q: "Any insight on how to do something simple like pass "Hello World" over port 81?"

"In basic sockets, a TCP client would:
1. Create a SOCK_STREAM socket with the socket() function.
2. ...

A UDP client would:
1. Create a SOCK_DGRAM socket with the socket() function.
2. ..."


Plus, UDP Packet loss due to collissions

"So, since you are transmitting 9.6 Mega Bytes/Sec and the MAX is
13.1Mega Bytes/Sec...

You can see why you are starting to get loss... you are getting close
to your theoretical transfer speed... "
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3522
Location: Zagreb

PostPosted: Fri Sep 29, 2006 7:58 am    Post subject: Reply with quote

Usenet groups:

1. microsoft.public.win32.programmer.networks

2. comp.os.ms-windows.programmer.networks

3. comp.os.ms-windows.programmer.tools.winsock

4. alt.winsock.programming

5. comp.protocols.tcp-ip

And a few more inside *.misc groups under comp.unix.bsd.* domain.
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3522
Location: Zagreb

PostPosted: Mon Oct 02, 2006 2:25 pm    Post subject: Reply with quote

Mistery demistifyed:

There are few handy functions for ip address manipulations: inet_aton(),
inet_ntoa(), and inet_addr() and they convert an IPv4 address from a
dotted-decimal string to its network binary value and vice versa.

But, there are these newer newer functions, inet_pton() and inet_ntop()
and they handle both IPv4 and IPv6 addresses.

Code:
#include <arpa/inet.h>
 
int         inet_aton (const char *strptr, struct in_addr *addrptr);
in_addr_t   inet_addr (const char *strptr);
char       *inet_ntoa (struct in_addr inaddr);

int         inet_pton (int family, const char *strptr, void *addrptr);
const char *inet_ntop (int family, const void *addrptr, char *strptr, size_t len);

Nice things to remember:
Code:
#define INET_ADDRSTRLEN    16   /* for IPv4 dotted-decimal */
#define INET6_ADDRSTRLEN   46   /* for IPv6 hex string */


typedef  uint32_t  in_addr_t;


struct in_addr {
  in_addr_t   s_addr;           /* 32-bit IPv4 address */
                                /* network byte ordered */
};

struct sockaddr_in {
  uint8_t         sin_len;      /* length of structure (16) */
  sa_family_t     sin_family;   /* AF_INET */
  in_port_t       sin_port;     /* 16-bit TCP or UDP port number */
                                /* network byte ordered */
  struct in_addr  sin_addr;     /* 32-bit IPv4 address */
                                /* network byte ordered */
  char            sin_zero[8];  /* unused */
};

struct sockaddr {
  uint8_t      sa_len;
  sa_family_t  sa_family;       /* address family: AF_xxx value */
  char         sa_data[14];     /* protocol-specific address */
};



Related thread at JoS: winsock... and a typedef question


Last edited by delovski on Tue Oct 03, 2006 12:33 pm; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3522
Location: Zagreb

PostPosted: Tue Oct 03, 2006 12:30 pm    Post subject: IPv6 Reply with quote

Slashdot: IPv6 Essentials

"IPv6 is halfway here, so network administrators need to learn their way
around it whether they want to or not. Adoption has been slower in the
United States because we possess the lion's share of IPv4 addresses, but
even so, someday IPv4 is going away for good. And, there is more to it
than just increasing the pool of available addresses. IPv6 has enough
improvements over IPv4 to make it worth the change even if we weren't
running out of IPV4 addresses, such as built-in IPSec, simplified routing and
administration, and scalability that IPv4 simply can't support. We're moving
into gigabyte and multi-gigabyte backbones, and high-demand real-time
services like voice-over-IP and streaming audio and video that require
sophisticated QoS (quality of service) and bandwidth prioritization. IPv6 can
handle these, IPv4 can't."
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3522
Location: Zagreb

PostPosted: Wed Oct 18, 2006 8:09 pm    Post subject: Reply with quote

DevShed: Interesting chat problem

"The standard input file, stdin, also has a file descriptor whose value is 0 -- 0
is stdin, 1 is stdout, 2 is stderr. So you can include 0 in the readset and use
select() to also test whether the user has typed anything in on the keyboard,
thus getting around the blocking nature of user-input functions. I just don't
know off-hand whether cin >> will cooperate with select()'s testing of stdin.

In Windows, sockets and files are different animals from each other and there
select() only works with sockets, not with files."


***

"You do really need to see an example of using select(), because it
involves setting up sets of the sockets for it to test (which needs to be done
each and every time you call select(); you can't just reuse the same sets
repeatedly), calling select(), then iterating through the sets to see if any of
the sockets are ready.

Here's an echo server example from a book:
http://cs.baylor.edu/~donahoo/PocketSocket/code/TCPEchoServer-SelectWS.c

They also have a non-blocking example at:
http://cs.baylor.edu/~donahoo/PocketSocket/code/BroadcastReceiverNonblockingWS.c

And all their Winsock examples:
http://cs.baylor.edu/~donahoo/PocketSocket/winsock.html "
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3522
Location: Zagreb

PostPosted: Sun Oct 22, 2006 11:35 am    Post subject: Reply with quote

How to write a Windows based socket client

"1. I should use the WSAAsyncSelect model which sends network events as
windows messages?"


"Yes, if your program is a GUI with a message pump.

2. Correct, there is no need to put an async socket in a separate thread.

I don't know of a non-MFC class, but if you have VC++ you can look at
the CAsyncSocket source code and modify it to suit."
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3522
Location: Zagreb

PostPosted: Sun Oct 29, 2006 11:53 am    Post subject: Reply with quote

Problem with winsock2 to setup a constant bit rate, please help

"Arkady (over in the other NG) has suggested that you play with the sizes of
the socket's buffers.  That might work, since to get decent speeds on
Winsock, it's sometimes necessary to change the per-socket buffer sizes
(setsockopt() with SO_SNDBUF and then with SO_RCVBUF) to values that are
larger than the default values. "
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3522
Location: Zagreb

PostPosted: Sat Nov 25, 2006 10:33 am    Post subject: Reply with quote

We're switching to IPv6, dontcha know, and it might be worth it.

Cringely: "To be fair, IPv6 is a far better solution to the problem of
diminishing Internet address space than NAT could ever have been. IPv6
just expands the total size of the address pool by making the addresses
substantially longer, with the benefit that the pool will be big enough for
every device to have its own unique static IP address."
Back to top
View user's profile Send private message Visit poster's website
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 3025
Location: Europe

PostPosted: Tue Nov 28, 2006 4:40 pm    Post subject: Reply with quote

JoS: Socket Question

"During the course of designing this program, I realized that at any given
time, a client needs to be essentially waiting for messages from the server,
but needs also to be waiting for input from the user to send messages to
the server."

***

"Threading on servers is generally going to be essential. On clients, not
so essential, although it can help. But remember, the "one thread per
connection" is a killer for servers. Loading up a thousand threads with
most of them just waiting around for a request to come in can really hurt. "
Back to top
View user's profile Send private message
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 3025
Location: Europe

PostPosted: Sat Dec 23, 2006 6:34 pm    Post subject: Reply with quote

RFC 1925 - The Twelve Networking Truths

"No matter how hard you push and no matter what the priority,
you can't increase the speed of light."
Back to top
View user's profile Send private message
delovski



Joined: 14 Jun 2006
Posts: 3522
Location: Zagreb

PostPosted: Sun Jan 28, 2007 10:41 am    Post subject: Reply with quote

Winsock Programmer's FAQ: Basic Example Programs

"Basic Blocking Client - A client that uses blocking sockets. This is the
simplest of the programs here.

Asynchronous I/O Client - A client that uses asynchronous sockets. This
program is a GUI MFC program, but it does not use CAsyncSocket or its
derivatives.

CAsyncSocket-based Client - A client that uses MFC's asynchronous
sockets wrapper class: CAsyncSocket.

Basic Blocking Server - A simple server that uses blocking sockets.

Multithreaded Server - A server that sends each new connection off to its
own thread to be handled while the main thread sits in a loop accepting
connections.

select()-based Server - A server that handles many connections using the
select() function to manage them all within a single thread."
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3522
Location: Zagreb

PostPosted: Sat Mar 10, 2007 12:50 am    Post subject: Reply with quote

arstechnica: Everything you need to know about IPv6

"More to the point, NAT is already in wide use, and apparently we still need
170 million new IP addresses every year."


IPv4 address ranges:

Class A: 1.0.0.1 to 126.255.255.254
Class B: 128.1.0.1 to 191.255.255.254
Class C: 192.0.1.1 to 223.225.254.254
Class D: 224.0.0.0 to 239.255.255.255 — reserved for multicast groups
Class E: 240.0.0.0 to 254.255.255.254 — reserved
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3522
Location: Zagreb

PostPosted: Sun Mar 11, 2007 1:26 am    Post subject: Reply with quote

Userlevel IPv6 Programming Introduction

"Storing Addresses, Resolving Addresses, Historic Name and Address Lookup,
Modern Address Lookup, Modern Host Name Lookup, Printing and Scanning
Addresses, Interface Checklist, Example Client & Example Server Code:

Despite the 10+ years of development many people still don't know how to
program for IPv6 or better yet, protocol independence. This can be seen by
the high number of programs which are still not IPv6-ready. I'll explain here
a few things related to the userlevel APIs people should be using. The text
should be helpful for people who write new code as well for those converting
IPv4-only code."
Back to top
View user's profile Send private message Visit poster's website
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 3025
Location: Europe

PostPosted: Fri May 25, 2007 3:54 pm    Post subject: Reply with quote

Slashdot: IPv4 Unallocated Addresses Exhausted by 2010

"Ars Technica is reporting on how the unallocated IPv4 address pool could
run out as soon as 2010. The IPv4 Address Report gives details on just how
fast the available pool of IPv4 addresses is diminishing. Will ISPs be moving
towards IPv6 any time soon? Or will IPv4 exhaustion become the next Y2K?"
Back to top
View user's profile Send private message
delovski



Joined: 14 Jun 2006
Posts: 3522
Location: Zagreb

PostPosted: Sat Jun 16, 2007 10:40 am    Post subject: Reply with quote

cboard: Winsock... What happens when the server dies?

"However, when I unplug the Ethernet cable from the server I don't get a
SOCKET_ERROR, recv() returns the size of the data I asked it to receive...
Any ideas?"
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3522
Location: Zagreb

PostPosted: Fri Jul 06, 2007 12:46 am    Post subject: Reply with quote

Digg: The Declaration of IPv6 Independence

"Somewhere in the 2020s, a decade after the last IPv4 address has been
used up, computer science students are going to learn about the transition
from IPv4 to IPv6 as an example of either the best or the worst system
upgrade in the world's history of system upgrades. We know it will be the
greatest system upgrade either way."
Back to top
View user's profile Send private message Visit poster's website
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 3025
Location: Europe

PostPosted: Sat Sep 22, 2007 6:47 pm    Post subject: Reply with quote

reddit: unix domain sockets vs. internet sockets

"UNIX domain sockets use the file system as the address name space. This
means you can use UNIX file permissions to control access to communicate
with them."
Back to top
View user's profile Send private message
delovski



Joined: 14 Jun 2006
Posts: 3522
Location: Zagreb

PostPosted: Thu Oct 04, 2007 5:04 pm    Post subject: Reply with quote

adc: GetPrimaryMACAddress

"This command-line tool demonstrates how to do retrieve the Ethernet MAC
address of the built-in Ethernet controller from the I/O Registry on Mac OS X.
This is useful if you need a means of uniquely identifying a Macintosh system."
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3522
Location: Zagreb

PostPosted: Sun Oct 07, 2007 12:28 am    Post subject: Reply with quote

Ubuntuforums: Using C programming language to access internet

"some code to get your started. this goes and fetches the main page from
google and prints it to terminal (along with the response header)"
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3522
Location: Zagreb

PostPosted: Sat Nov 17, 2007 2:44 pm    Post subject: Reply with quote

Digg: A Great Introduction and History of TCP/IP

"Very well laid out guide for those of us who are not quite sure what
TCP/IP is exactly. It is also a great review for CCNA students. This is
definitely bookmark worthy."
Back to top
View user's profile Send private message Visit poster's website
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 3025
Location: Europe

PostPosted: Tue Jan 08, 2008 6:50 pm    Post subject: Reply with quote

Slashdot: Cryptographically Hiding TCP Ports

"The shimmer project implements a cryptographically-based system for
hiding important (e.g. SSH) open ports in plain sight. By automatically
forwarding from a range of ports all but one of which are honeypots and
by changing the ports every minute only a user knowing a shared secret
can determine the location of the real SSH server."
Back to top
View user's profile Send private message
XNote
Kapetan


Joined: 16 Jun 2006
Posts: 532

PostPosted: Sat May 24, 2008 3:39 pm    Post subject: Reply with quote

dæmonology - The Future Without IPv6

"It's time to start talking about what the Internet will be like in a future where
we abandon all our efforts toward the IPv6 transition. Because the transition
isn't happening. It's not going to happen. We're going to be living on IPv4/NAT
for the rest of our lives."
Back to top
View user's profile Send private message
XNote
Kapetan


Joined: 16 Jun 2006
Posts: 532

PostPosted: Fri Jul 11, 2008 4:29 pm    Post subject: Reply with quote

Brian E. Hall - Beej's Guide to Network Programming

"Hello, one and all! This is my little how-to guide on network programming
using Internet sockets, or "sockets programming", for those of you who
prefer it. The sockets API, though started by the Berkeley folk, has been
ported to many many platforms, including Unix, Linux, and even Windows."
Back to top
View user's profile Send private message
XNote
Kapetan


Joined: 16 Jun 2006
Posts: 532

PostPosted: Wed Aug 20, 2008 7:10 pm    Post subject: Reply with quote

Apple's secret "Back to My Mac" push behind IPv6

"The Internet is running out of addresses. To get around this problem and a
host of others not addressed in the existing Internet Protocol (IPv4), a new
revision has been in development for years, called IPv6. Uptake has been slow;
it requires upgrading all the routers and devices that make up the Internet.

Apple has a few tricks up its sleeve for pushing IPv6 adoption, and many Mac
users are already chin deep in the technology without even knowing it. Here's
why, and what it means for users on every platform."
Back to top
View user's profile Send private message
delovski



Joined: 14 Jun 2006
Posts: 3522
Location: Zagreb

PostPosted: Sun Oct 19, 2008 12:59 pm    Post subject: Reply with quote

SO - How do you programmatically determine whether a Windows
computer is a member of a domain?


"I need a way to determine whether the computer running my program is
joined to any domain. It doesn't matter what specific domain it is part of,
just whether it is connected to anything."
Back to top
View user's profile Send private message Visit poster's website
XNote
Kapetan


Joined: 16 Jun 2006
Posts: 532

PostPosted: Fri Jun 05, 2009 6:00 pm    Post subject: Reply with quote

mobileorchard.com - Tutorial: Networking and Bonjour on iPhone

"In this tutorial, we are going to explore a simple chat application for the
iPhone. It allows you to host your own chat room and advertise it on your
local Wi-Fi network (in which case your app acts as a chat “server”) or find
and join chat rooms hosted by other people on your network (acting as a
chat “client”)."
Back to top
View user's profile Send private message
delovski



Joined: 14 Jun 2006
Posts: 3522
Location: Zagreb

PostPosted: Fri Jul 03, 2009 5:20 pm    Post subject: Reply with quote

Simon Amor - Introduction to network functions in C

"In this tutorial, I will attempt to explain the use and syntax of some of the
basic UNIX networking functions in C. If you want to know more about Wi-
ndows Sockets programming, I'm afraid the WinSock resources at Star-
Dust have disappeared now - any pointers to similar pages would be ap-
preciated!

You might also want to check out the Internet programming crash course.
You could also visit Networking ABC Everything Networking, from 2 compu-
ter home networking to XP networking.

There are some example programs which I will explain how to write from
the beginning. If you would like to know more about a function, you might
have on-line manual pages (use 'man function') or your system admini-
strators may be able to provide manuals. "
Back to top
View user's profile Send private message Visit poster's website
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 3025
Location: Europe

PostPosted: Fri Jul 24, 2009 10:19 am    Post subject: Reply with quote

ASIHTTPRequest

"ASIHTTPRequest is an easy to use wrapper around the CFNetwork API that
makes some of the more tedious aspects of communicating with web servers
easier. It is written in Objective-C and works in both Mac OS X and iPhone
applications.

It is suitable performing basic HTTP requests and interacting with REST-ba-
sed services (GET / POST / PUT / DELETE). The included ASIFormDataRe-
quest subclass makes it easy to submit POST data and files using multipa-
rt/form-data.

ASIHTTPRequest comes with a simple Mac OS X application that demon-
strates many of the features above. Just look at AppDelegate.m for good
pointers on basic usage, or read the comments in ASIHTTPRequest.h for
more detail. A basic iPhone sample application is also included."
Back to top
View user's profile Send private message
delovski



Joined: 14 Jun 2006
Posts: 3522
Location: Zagreb

PostPosted: Mon Jul 27, 2009 12:03 am    Post subject: Reply with quote

idevgames.com - For those doing realtime networked games

"Also well worthwhile, the Quake 3 networking model,
...
and an article about how the original UT does it..."
...
"Hey guys, there is a new series of articles on game networking here..."
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3522
Location: Zagreb

PostPosted: Tue Aug 11, 2009 7:18 pm    Post subject: Reply with quote

so - How can I programmatically get the MAC address of an iphone

"I think its basic OSX stuff. Actually its basic BSD stuff. The same approach
would most likely work on linux as well (even possibly windows with a little
tweaking)..."
Back to top
View user's profile Send private message Visit poster's website
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 3025
Location: Europe

PostPosted: Mon Aug 24, 2009 6:59 pm    Post subject: Reply with quote

cboard - Packet max size

"Ethernet is physically incapable of that. You cannot have a frame of that
size. The hardware can't do it."
Back to top
View user's profile Send private message
delovski



Joined: 14 Jun 2006
Posts: 3522
Location: Zagreb

PostPosted: Mon Aug 24, 2009 11:16 pm    Post subject: Reply with quote

iana.org - MIME Media Types

"The following is the list of Directories of Content Types and Subtypes: appli-
cation, audio, example, image, message, model, multipart, text, video."


HOWTO: Serving up default favicon.ico and robots.txt files with apache

"As a webmaster, or system administrator of an Apache webserver, did you
ever wonder how to stop those annoying 404 (page not found) errors for all
the requests for favicon.ico and robots.txt?"
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3522
Location: Zagreb

PostPosted: Tue Sep 08, 2009 11:06 pm    Post subject: Reply with quote

ars - 2010 could be the last year for IPv4 as we know it

"The global pool of IPv4 addresses is scheduled to run dry in 2011. Don't co-
unt on being able to get new addresses after that, and be ready for peer-to-
peer applications to be hit by hard times."
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3522
Location: Zagreb

PostPosted: Sat Sep 12, 2009 3:23 pm    Post subject: Reply with quote

zeroconf.org - Zero Configuration Networking (Zeroconf)

"By the time the Working Group completed its work on Dynamic Configura-
tion of IPv4 Link-Local Addresses and wrapped up in July 2003, IPv4LL was
implemented and shipping in Mac OS (9 & X), Microsoft Windows..., in every
network printer from every major printer vendor, and in many assorted net-
work devices from a variety of vendors. IPv4LL is available for Linux and for
embedded operating systems."
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3522
Location: Zagreb

PostPosted: Sat Oct 03, 2009 4:07 pm    Post subject: Reply with quote

Cocoa for Scientists - Bonjour and How Do You Do?

"In this tutorial, we are going to look at the first challenge of connecting
two systems, that of locating each other on a local network. For this, we
are going to use Apple’s Bonjour. For the overly pedantic, Bonjour is Ap-
ple’s implementation of Zeroconf, but you really don’t need to know too
much about how it works to use it."


And the next part: This is the Message
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3522
Location: Zagreb

PostPosted: Mon Nov 16, 2009 9:11 pm    Post subject: Reply with quote

MF - Getting Network Packets Data

"I want to write a cocoa application which will capture the network packets
on a particular port."
Back to top
View user's profile Send private message Visit poster's website
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 3025
Location: Europe

PostPosted: Mon Apr 19, 2010 5:51 pm    Post subject: Reply with quote

princeton.edu - iPad/iPhone OS 3.2 Stops Renewing DHCP Lease,
Keeps Using IP Address


"This document provides details of the iPad/iPhone OS 3.2 DHCP issue
Princeton University began seeing in April 2010. It provides information
for individuals who would like more technical details about the issue."
Back to top
View user's profile Send private message
delovski



Joined: 14 Jun 2006
Posts: 3522
Location: Zagreb

PostPosted: Wed May 05, 2010 4:59 pm    Post subject: Reply with quote

Jeff LaMarche - NSStream: TCP and SSL

"On Mac OS X, NSStream, the superclass of both NSInputStream and
NSOutputStream, has a class convenience method called getStreamsTo-
HostNamed:port:inputStream:outputStream which creates a stream pair
to a specified remote host. For some reason unbeknownst to me, Apple
chose not to include this convenience method in the iPhone SDK.

The way that we enable SSL encryption is to simply use setProperty:forKey:
on both streams, setting the key NSStreamSocketSecurityLevelKey to a
value that specifies the version of SSL to use. If you want to tell NSStream
to use the highest version supported in common with the remote connection,
specify NSStreamSocketSecurityLevelKey. That's what you'll usually want."
Back to top
View user's profile Send private message Visit poster's website
delovski



Joined: 14 Jun 2006
Posts: 3522
Location: Zagreb

PostPosted: Thu May 06, 2010 12:25 am    Post subject: Reply with quote

SO - Is there any secure way to establish 2-way SSL from an application

"These certificates can be generated at first login, or perhaps when the app
is purchased. The web application side of things should have a full list of va-
lid client certificates that will be used to check incoming connections. This
means you can authenticate clients with ssl and you don't need a full PKI, all
client certificates should be free of charge. You should buy a valid certificate
for your server."
Back to top
View user's profile Send private message Visit poster's website
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 3025
Location: Europe

PostPosted: Sat May 14, 2011 5:45 pm    Post subject: Reply with quote

Stefan Klumpp - Debugging Client-Server Communication

"Especially in mobile development you most likely have some client-server
communication going on, which is often the source of a lot of problems and
long debugging sessions. To make the debugging easier it is helpful to see
what each side sends or receives."
Back to top
View user's profile Send private message
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 3025
Location: Europe

PostPosted: Thu Mar 28, 2019 10:59 pm    Post subject: Reply with quote

https://old.reddit.com/r/iOSProgramming/comments/b6lij5/its_time_to_break_up_with_your_networking_library/

ArticleIt's time to break up with your networking library for URLSession
Back to top
View user's profile Send private message
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 3025
Location: Europe

PostPosted: Thu Apr 22, 2021 10:56 pm    Post subject: Reply with quote

r - Simple reddit-like CRUD website written in C

"I did not use any frameworks for this. I wrote the server code entirely from
scratch and in C for everything from managing socket connections to parsing
requests to my own HTML page templating system. No single part of it is all
that complex, although altogether it is kind of a lot."
Back to top
View user's profile Send private message
Ike
Kapetan


Joined: 17 Jun 2006
Posts: 3025
Location: Europe

PostPosted: Wed Mar 20, 2024 8:19 pm    Post subject: Reply with quote

jdeen - Airport - The nifty command line wireless utility for macOS

"I wondered if I could use the terminal to connect to WiFi networks without
needing to fiddle with the trackpad. It has the benefit of looking Hacker Like
for a secretariat of two."
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Igor Delovski Board Forum Index -> General Programming All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Delovski.hr
Powered by php-B.B. © 2001, 2005 php-B.B. Group