[governance] Uni.X to Uni.X .NETworking UDP and LAN-Link Topics

Jim Fleming JimFleming at ameritech.net
Thu Dec 15 20:55:09 EST 2005


As computer professsionals with social responsibility, it seems prudent that
people
should be advised about what is actually being placed in packets, recorded,
etc.
A major issue in the computer field has been the use of hardware IDs, MAC
addresses, etc.
in larger address spaces.

With the 64-bit addressing in the Uni.X to Uni.X .NETworking, the 48-bit MAC
field is
preserved as shown below. 12 bits of the legacy UDP ports are preserved in
the header.
4 bits from the legacy IP address field are preserved. The 48-bit MAC field
can be changed
by the user in the consumer video-game device that generates and terminates
the traffic.
The Uni.X to Uni.X .NETwork layer is used to bridge the LANs to allow people
to play
from their various locations, as if in the same room with wires between the
boxes. You can
talk to each other with voice in the 3D game lobby and in the game when near
another player.

The legacy UDP port field is divided into 4+12 bits. All 16 bits are
preserved. The 4 bits
from the source and destination ports are sent in one byte following the
header. The original
TOS field (zero for now) and the identification field is also preserved. The
redundant checksum
is removed and covers the header and contents. The code loads as a passive
module that runs
on top of the LAN drivers. It auto-tunnels by adding yet another Routing
Header in front to
get across the legacy transport. Users meet in other 3D game lobbies to
connect and play.

Testing has shown that users CAN change their MAC addresses and it all
works. Market
tests have shown that users generally do not change their MAC addresses, and
some
software enforces that their MAC addresses have the correct vendor codes.
Computer
Professionals with Social Responsibility may want to help educate people
about the pros
and cons of using hardware MAC addresses. Also, with people changing their
MAC
addresses, that opens up the ability to, more easily, impersonate another
device.

When the 48-bit portion of the 64-bit address is used for forwarding (aka
routing) and
aggregation, the user may be required to change the MAC address to
participate in some
services. That of course opens up another set of issues surrounding the
breakage of some
services that depend on the MAC address not being changed. MAC to MAC
mapping
helps to reduce concerns, but end-to-end transport of the MAC values may be
required
to make some of the services work. As people can see below, the IP address
is mostly
not used, with only 4-bits preserved end-to-end.

Computer Professionals with Social Responsibility may want to consider the
need to
educate people about the pros and cons of having their LANs virtually
bridged between
many locations. Devices plugged into a hub in one place, start to appear in
another location.
People may not realize that their microphone on a video game is broadcasting
their voice
all around the planet. The G-bit, [below] is used to tag true broadcast
LAN-link packets.
Other packets have a 7 hop limit, which makes the game-play experience
doable on modern
broadband Uni.X transports. A $99 after-market game console makes for a nice
cyberspace
device to meet with other people, without flying around the world to
meat-space meetings.
CPSR people may be surprised that people in cyberspace have their own
governance and
write code to make it all work, as in NETwork. Below are some snippets from
running code.

 /* Build the Uni.X version of the packet */
 u = &U8out[20];
 /* Header(20)+PORT(1)+TOS(1)+ID(2)+UDP_DATA-UDP_HDR(8) */
length = 20+1+1+2+udp_len-8;
SET_V16_global(u,global);
SET_V16_hops(u,7);
SET_V16_protocol(u,UDP_11);
SET_V16_length(u,length);

/* Use 12 bits of the UDP port */
Saddr_set(u,(((U64)src_port&0x0FFF)<<52)|((src_mac&0x0000FFFFFFFFFFFF)<<4)|(
src_ip&0x0F));

Daddr_set(u,(((U64)dst_port&0x0FFF)<<52)|((dst_mac&0x0000FFFFFFFFFFFF)<<4)|(
dst_ip&0x0F));

 /* just in case burn 4 bytes and send original upper ports bits, tos and
ident */
 u[20]=ports;
u[21]=tos;
 u[22]=ident>>8;
 u[23]=ident;
/* skip legacy UDP header */
 p += 20+8;
 for(i=0; i<(udp_len-8); i++){
    u[24+i]=*p++;
 }
 SET_V16_checksum(u,0);
 SET_V16_checksum(u,Checksum_of(u,length,0));

#define U64 unsigned long long

/*
* SSDD.SSDD.SSSSDDDD.SSSDDD.LLLLLLLLLLL
* SSSSSSSDDDDDDD.SD.SD.SD.SSSSSSDDDDDD
* SD.SD.G.TTT.PP.SSSDDD.CCCCCCCCCCCCCCCC
* SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS
* DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD
*
* VVVVPPPPPPPPLLLLFFFFFFFFFFFFFFFF
* LLLLLLLLLLLLLLLLNNNNNNNNHHHHHHHH
* SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS
* SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS
* 00000000111111112222222233333333
* 44444444555555556666666677777777
* DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD
* DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD
* 8888888899999999AAAAAAAABBBBBBBB
* CCCCCCCCDDDDDDDDEEEEEEEEFFFFFFFF
*
*/

#define GOD_00  0
#define CORPS_01 1
#define COUNTRY_10 2
#define YOU_11  3

#define EARTH_00 0
#define MOBILE_01 1
#define MOON_10  2
#define MARS_11  3

#define NOP_00  0
#define ICMP_01  1
#define TCP_10  2
#define UDP_11  3

#define BYTE_00  0
#define SHORT_E_01 1
#define SHORT_O_10 2
#define PIPE_11  3

/*
* Message Field Macros
*/

#define SET_V16_verSS(c,v) c[0]=((c[0]&0x3F)|((v&0x03)<<6))
#define GET_V16_verSS(c) ((c[0]>>6)&0x03)
#define SET_V16_verDD(c,v) c[0]=((c[0]&0xCF)|((v&0x03)<<4))
#define GET_V16_verDD(c) ((c[0]>>4)&0x03)
#define GET_V16_verSSDD(c) ((c[0]>>4)&0x0F)
#define SET_V16_hlnSS(c,v) c[0]=((c[0]&0xF3)|((v&0x03)<<2))
#define GET_V16_hlnSS(c) ((c[0]>>2)&0x03)
#define SET_V16_hlnDD(c,v) c[0]=((c[0]&0xFC)|((v&0x03)<<0))
#define GET_V16_hlnDD(c) (c[0]&0x03)
#define GET_V16_hlnSSDD(c) (c[0]&0x0F)
#define SET_V16_tosSSSS(c,v) c[1]=((c[1]&0x0F)|((v&0x0F)<<4))
#define GET_V16_tosSSSS(c) ((c[1]>>4)&0x0F)
#define SET_V16_tosDDDD(c,v) c[1]=((c[1]&0xF0)|((v&0x0F)<<0))
#define GET_V16_tosDDDD(c) (c[1]&0x0F)
#define GET_V16_tosSSSSDDDD(c) (c[1])
#define SET_V16_govSSS(c,v) c[2]=((c[2]&0x1F)|((v&0x07)<<5))
#define GET_V16_govSSS(c) ((c[2]>>5)&0x07)
#define SET_V16_govDDD(c,v) c[2]=((c[2]&0xE3)|((v&0x07)<<2))
#define GET_V16_govDDD(c) ((c[2]>>2)&0x07)
#define GET_V16_govSSSDDD(c) ((c[2]>>2)&0x3F)
#define LENGTH_160 20
#define SET_V16_oldlength(c,v) c[2]=(v>>8);c[3]=(unsigned char)v;
#define SET_V16_length(c,v) c[2]=((c[2]&0xFC)|((v>>8)&0x03));c[3]=v;
#define GET_V16_length(c) ((((c[2]<<8)&0x0300)|c[3])&0x3FF)
#define SET_V32_addrSSDD(c,v) c[2]=(c[2]&0xFC);c[3]=(v&0x0F);
#define SET_V48_addrSD(c,v) c[2]=(c[2]&0xFC);c[3]=(v&0x03)+16;
#define SET_V16_blength(c,v) c[2]=((c[2]&0xFC)|(v&0x03))
#define GET_V16_blength(c) (c[2]&0x03)
#define SET_V16_byte(c,v) (c[3]=v)
#define GET_V16_byte(c) (c[3])
#define SET_V16_id(c,v) c[4]=(v>>8);c[5]=(unsigned char)v;
#define SET_V16_idaSSSSSSS(c,v) c[4]=((c[4]&0x01)|((v&0x7F)<<1))
#define GET_V16_idaSSSSSSS(c) ((c[4]>>1)&0x7F)
#define SET_V16_idaDDDDDDD(c,v)
c[4]=((c[4]&0xFE)|((v&0x40)>>6));c[5]=((c[5]&0x03)|((v&0x3F)<<2))
#define GET_V16_idaDDDDDDD(c) (((c[4]&0x01)<<6)|((c[5]>>2)&0x3F))
#define GET_V16_idaSSSSSSSDDDDDDD(c) ((((c[4]<<6)&0x3FC0))|((c[5]>>2)&0x3F))
#define SET_V16_idbS(c,v) c[5]=((c[5]&0xFD)|((v&0x01)<<1))
#define GET_V16_idbS(c) ((c[5]>>1)&0x01)
#define SET_V16_idbD(c,v) c[5]=((c[5]&0xFE)|((v&0x01)<<0))
#define GET_V16_idbD(c) (c[5]&0x01)
#define GET_V16_idbSD(c) (c[5]&0x03)
#define SET_V16_pivS(c,v) c[6]=((c[6]&0x7F)|((v&0x01)<<7))
#define GET_V16_pivS(c) ((c[6]>>7)&0x01)
#define SET_V16_pivD(c,v) c[6]=((c[6]&0xBF)|((v&0x01)<<6))
#define GET_V16_pivD(c) ((c[6]>>6)&0x01)
#define GET_V16_pivSD(c) ((c[6]>>6)&0x03)
#define SET_V16_dmzS(c,v) c[6]=((c[6]&0xDF)|((v&0x01)<<5))
#define GET_V16_dmzS(c) ((c[6]>>5)&0x01)
#define SET_V16_dmzD(c,v) c[6]=((c[6]&0xEF)|((v&0x01)<<4))
#define GET_V16_dmzD(c) ((c[6]>>4)&0x01)
#define GET_V16_dmzSD(c) ((c[6]>>4)&0x03)
#define SET_V16_frgSSSSSS(c,v)
c[6]=((c[6]&0xF0)|((v&0x3C)>>2));c[7]=((c[7]&0x3F)|((v&0x03)<<6))
#define GET_V16_frgSSSSSS(c) (((c[6]<<2)&0x3C)|((c[7]>>6)&0x03))
#define SET_V16_frgDDDDDD(c,v) c[7]=((c[7]&0xC0)|((v&0x3F)<<0))
#define GET_V16_frgDDDDDD(c) (c[7]&0x3F)
#define GET_V16_frgSSSSSSDDDDDD(c) (((c[6]<<8)&0x0F00)|c[7])
#define SET_V16_ttaS(c,v) c[8]=((c[8]&0x7F)|((v&0x01)<<7))
#define GET_V16_ttaS(c) ((c[8]>>7)&0x01)
#define SET_V16_ttaD(c,v) c[8]=((c[8]&0xBF)|((v&0x01)<<6))
#define GET_V16_ttaD(c) ((c[8]>>6)&0x01)
#define GET_V16_ttaSD(c) ((c[8]>>6)&0x03)
#define SET_V16_ttbS(c,v) c[8]=((c[8]&0xDF)|((v&0x01)<<5))
#define GET_V16_ttbS(c) ((c[8]>>5)&0x01)
#define SET_V16_ttbD(c,v) c[8]=((c[8]&0xEF)|((v&0x01)<<4))
#define GET_V16_ttbD(c) ((c[8]>>4)&0x01)
#define GET_V16_ttbSD(c) ((c[8]>>4)&0x03)
#define SET_V16_global(c,v) c[8]=((c[8]&0xF7)|((v&0x01)<<3))
#define GET_V16_global(c) ((c[8]>>3)&0x01)
#define SET_V16_hops(c,v) c[8]=((c[8]&0xF8)|((v&0x07)<<0))
#define GET_V16_hops(c) (c[8]&0x07)
#define SET_V16_proto(c,v) c[9]=((unsigned char) v)
#define SET_V16_protocol(c,v) c[9]=((c[9]&0x3F)|((v&0x03)<<6))
#define GET_V16_protocol(c) ((c[9]>>6)&0x03)
#define SET_V16_proSSS(c,v) c[9]=((c[9]&0xC7)|((v&0x07)<<3))
#define GET_V16_proSSS(c) ((c[9]>>3)&0x07)
#define SET_V16_proDDD(c,v) c[9]=((c[9]&0xF8)|((v&0x07)<<0))
#define GET_V16_proDDD(c) (c[9]&0x07)
#define GET_V16_proSSSDDD(c) (c[9]&0x3F)
#define SET_V16_checksum(c,v) c[11]=(v>>8);c[10]=(unsigned char)v;
#define GET_V16_checksum(c) ((c[11]<<8)|c[10])
#define SET_V16_adrS32(c,v)
c[12]=((v&0xFF000000)>>24);c[13]=((v&0x00FF0000)>>16);c[14]=((v&0x0000FF00)>
>8);c[15]=(v&0xFF)
#define SET_V16_adrD32(c,v)
c[16]=((v&0xFF000000)>>24);c[17]=((v&0x00FF0000)>>16);c[18]=((v&0x0000FF00)>
>8);c[19]=(v&0xFF)

U64 Saddr_get();
U64 Daddr_get();

_______________________________________________
governance mailing list
governance at lists.cpsr.org
https://ssl.cpsr.org/mailman/listinfo/governance



More information about the Governance mailing list