home *** CD-ROM | disk | FTP | other *** search
/ ftp.ee.pdx.edu / 2014.02.ftp.ee.pdx.edu.tar / ftp.ee.pdx.edu / pub / mobile / urld / ABOUT.txt next >
Text File  |  2002-06-30  |  12KB  |  273 lines

  1. URLD - A wireless-oriented web page discovery program.
  2.  
  3. This document is an introduction to urld.
  4.  
  5.                 Jim Binkley   jrb@cs.pdx.edu
  6.                 Sumit Chawla, sumit@cs.pdx.edu
  7.  
  8. Outline:
  9.  
  10. 1. basic idea
  11.     introduction
  12.     2 usage scenarios
  13. 2. help needed
  14.     port it to something
  15.     demo it on something
  16.     do something nifty and unexpected with it 
  17. 3. implementation/how it works (some details)
  18. 4. security considerations
  19. 5. contact us
  20.  
  21. ---------------------------
  22. 1. Basic Idea
  23.  
  24. Urld reads and writes UDP-based broadcast messages made up 
  25. of World Wide Web Uniform Resource Locaters (URLs).  These
  26. messages consist of a system identity string and an associated
  27. set of 1 or more HTML tags; for example, one URL might consist of:
  28.  
  29. http://www.cs.pdx.edu, "PSU CS department page"   
  30.  
  31. And the logical output in the web page created by urld on some 
  32. other system might look like:
  33.  
  34. 131.252.201.4  homebrew.cs.pdx.edu
  35.  
  36.     PSU CS department page  <----- an url ...
  37.     ----------------------
  38.  
  39. Messages from nearby nodes are sent to IP limited broadcast
  40. and are written to a local html file on a receiving system.  For
  41. example, on UNIX, the default output file is /tmp/urld.html.  This file
  42. may be viewed by any web browser via file:/tmp/urld.html.
  43. As a result one can determine nearby systems.  In summary, 
  44. systems advertise WWW URLs to each other.
  45.  
  46. Thus we can distinquish between two kinds of urld runtime modes, which
  47. we can call "reading" and "writing".  A system may be a reader (sends
  48. URLs), a writer (reads URLs and puts them in a local html page), or both.
  49. Doing both is the default.  On the other hand, A wireless laptop or
  50. PDA user might minimally want to be a reader to find locally hearable
  51. servers advertising thru public access points.  A fixed server (a wired
  52. box) might be a writer hooked up on the same network as an
  53. 802.11 access point.  Thus urld serves as a way to advertise local
  54. information thru the access point to wireless systems that are in
  55. the same "cell".  Of course remote URLs reachable via the Internet
  56. can be advertised too.  An advertised URL does not need to be local.
  57. (Local content can be a remote web server).  However the advertising
  58. system is local or at least hearable via a local broadcast.
  59.  
  60. The server maintainer might not be too interested in seeing who
  61. showed up at the cafe, and might simply run a write-only mode.  On
  62. the other hand, A laptop/PDA user (hereafter a mobile user), might
  63. want to both be a reader/writer to both learn about other urld
  64. systems nearby (including special monthly coffee deals at the local
  65. coffee emporium that is acting as a public 802.11 site)
  66. and/or advertise the cool web pages that said Mobile User is making
  67. available either on their laptop or someplace else.
  68.  
  69. We suggest that by default everybody run reader/writer, but you have to 
  70. make your own decision.  A Mobile User might not wish to let others know 
  71. that he/she is lurking nearby.  DE GUSTIBUS NON DISPUTANDUM EST.
  72. (How do you say mobile in Latin?).
  73.  
  74. btw, urld now has an official IANA approved UDP port, 3534.
  75.  
  76. 1.1 usage scenarios
  77.  
  78. Let us suggest three possible usage scenarios, which we will call:
  79.  
  80. 1. server advertisements
  81.  
  82. Assume you have urld, and are the owner of an Access Point that you
  83. have made available to the public somehow, be it a for-pay scheme, or
  84. a free scheme.  Let's assume your company sells almond lattes, and is
  85. called lottajava inc.  And that you have a web server somewhere (possibly
  86. on your local urld server or elsewhere) that has a web page setup to
  87. advertise your company either locally or nationally.  This "web server"
  88. could be on an openAP system, of course.  Or it could be somewhere else
  89. entirely.  This is your choice.  We would point out though that "local"
  90. urls may be better, because you are trying to advertise to *local* customers.
  91.  
  92. You could hook up urld as follows:
  93.  
  94. -------------
  95. |  server   |  <--- runs urld and writes to ethernet broadcast
  96. -------------
  97.       |
  98.       | ethernet (urld writes urld message)
  99.       ----------------------------------------------------
  100.                 |
  101.                 | ethernet
  102.                  802.11 Access Point
  103.                 |
  104.                 | WLAN side
  105.         -------------------------------------
  106.         |        |            |   local wireless domain
  107. urld readers    MU1        MU2            MU3
  108.          
  109. The above could be collapsed/integrated onto a UNIX system that has openAP
  110. capability.  Note that the AP is a bridge.  We expect broadcast packets
  111. sent on the ethernet to wander onto the wireless link (which is how
  112. things work anyway).
  113.  
  114. You create a web page on the server (or somewhere), and setup 
  115. the urld configuration as a writer, to advertise your url as follows:
  116.  
  117. http://www.lottajava.com   LottaJava Inc page
  118.  
  119. Your server (we will assume it is a UNIX box, say running linux,
  120. with an ethernet port called eth0) has urld on it, and possibly a
  121. web server for www.lottajava.com, although the web server could be in
  122. Jamaica. You run urld in writer mode, and it writes out your url above.
  123. Your customers can see it, since they are running urld in reader mode.
  124. So then your url is stored in customer urld read-side output files.
  125. The customer simply uses any web browser, displays the local urld file,
  126. and then clicks on your url to visit your page.  By default urld sends
  127. messages every 10 seconds, and then throws them away if they are not
  128. refreshed in around 30 seconds.
  129.  
  130. 2. mobile node advertisements (Mobile Users as peers)
  131.  
  132. In theory, with an 802.11 AP in managed mode, it MAY be possible for
  133. Mobile Users to see other Mobile Users.  (We need to widely deploy
  134. urld and see what features or misfeatures of APs exist in that arena).
  135. (In theory, this should work.  In practice, it HAS worked, but there is
  136. no telling how random APs may behave in this regard).  So for example,
  137. MN1 above at the coffee shop, should be able to see that MN2 and MN3 are
  138. "nearby".  This assumes of course that MN1, etc., are writing.  If they
  139. are reading, you won't know about them from the urld point of view.
  140. Lurking nodes are certainly possible.
  141.  
  142. 3. ad hoc applications based on #2
  143.  
  144. If Mobile Nodes can send messages, it should be possible to build
  145. higher-level applications that could take the file:/tmp/urld.html
  146. file as input, (or a pure XML version) and thus determine local systems 
  147. (local peers).  This might allow systems that are in the same broadcast 
  148. domain (broadcast area) to exchange files in a peer-peer fashion.  
  149. One could write a messaging application or a N-party game as well.
  150. XML probably has a role to play here.
  151.  
  152. ---------------
  153. 2. help needed
  154.  
  155. We need the assistance of a community committed to making this work.
  156. We submit that urld is a mobile-wireless application, and can have
  157. widespread applicability in helping to make public (and private) wireless 
  158. nodes popular, especially with the people bringing up APs for public
  159. use. 
  160.  
  161. How can others help?
  162.  
  163. 1. port urld to something else.  Ideally, urld needs to be as universal
  164. as possible.  We have supplied linux/freebsd/WIN32 and (not yet) java versions.
  165. (They may have bugs and can stand more testing too).
  166. Urld can stand to be ported to other platforms.  If you do so,
  167. please resubmit your code with binary for re-release.  
  168.  
  169. 2. set urld up and test it and demonstrate it to others.  Propaganda
  170. efforts are needed and are important.  Urld needs to be deployed
  171. on wired servers so that wireless customers can take advantage of it.
  172.     
  173. 3. take urld and engineer up some higher-level application for it.
  174. Something using XML would be a very nice idea.
  175.  
  176. ---------------
  177. 3. Some implementation details
  178.  
  179. Note we have supplied WIN32, FreeBSD, and Linux capabilities,
  180. as well as a java script.
  181.  
  182. In this section, we present a few implementation details.
  183. Urld is in some sense, "simple", and maybe it is not so simple.
  184.  
  185. 3.1 sockets
  186.  
  187. Of course, urld uses UDP sockets.  There is a reader socket, and
  188. 1 to many writer sockets.  Writer sockets are per interface.
  189. 1 to N interfaces may be specified in the config file.  Each
  190. interface means urld is supposed to write the broadcast (or multicast)
  191. urld packet out said interface.  There are various not terribly
  192. interoperable mechanisms used to bind "broadcast" output to
  193. an interface.  On BSD, it is a pain in the rear end, as you
  194. have to use the Berkeley Packet Filter (bpf).  On linux there is
  195. a nice socket option that makes it easy.  Thus we can distinquish
  196. at least various different possible capabilities like so:
  197.  
  198. can read broadcast and/or multicast
  199.  
  200. can write broadcast/and or multicast to a "default" interface.
  201.  
  202.     can write broadcast to a second interface, that is
  203.         not the first interface (according to ifconfig -a)
  204.  
  205.     can write broadcast/multicast to > 1 interface
  206.  
  207. In general linux/Freebsd systems can do all of the above, barring
  208.     FreeBSD not being able to write when an interface command
  209.     is not explicitly mentioned.  Sumit came up with a way
  210.     to make this fairly flexible with WIN32 as well.
  211.  
  212. 3.2 write side
  213.  
  214. The writer takes urls specified in the urld.conf file and
  215. writes them out 1-N interfaces in a Tag Length Value format.
  216. The protocol itself is specified in docs/urld_protocol.txt,
  217. and is fairly straightforward and easily extensible (similar
  218. to radius when it gets down to it).  Writes are coordinated by
  219. the sendTime configuration setting which like all urld timers
  220. is measured in seconds.  Of course, this is done with "alarm" or 
  221. any functional equivalent that gives you seconds.  
  222. Logically urld can be divided into a writer thread and a reader
  223. thread.  However, on UNIX, the two threads can be "simulated"
  224. possibly with an alarm signal, and the select(2) system call.
  225.  
  226. 3.3 read side
  227.  
  228. The read side reads ALL packets send to broadcast or multicast 224.0.0.1.
  229. output is "filtered" in the sense that the MD5 message digest function
  230. is used to learn if urls are "new" or not within the expire number
  231. of seconds.  If not new, urls are ignored.  As a result, urld does
  232. not write out its output HTML file, unless urls actually change
  233. for some reason.  It will however, write that file out if a change
  234. does occur immediately upon the reception of any packet.  Urls will
  235. time out eventually, which will also cause a rewrite of the file. 
  236. In addition, an optional urlTime timer is provided that sets
  237. the automatic HTML "rewrite" pragma timer, which in theory,
  238. should automatically "reload" a page.
  239.  
  240. ---------------
  241. 4. security considerations
  242.  
  243. The fundamental problem with urld security is likely no different
  244. from using the web elsewhere.  All urld does is produce a web file.
  245. When you click on something in that web file, be careful what you
  246. download, and especially download and execute with a web browser.
  247. Common sense should apply here.  For example, if someone offers up a web 
  248. page that consists of a word document, urld isn't going to make downloading 
  249. that and viewing it any more or less safe.  It isn't going to
  250. prevent you from downloading and executing a trojan horse program.
  251.  
  252. Urld does not execute anything.  It also limits the number of urls
  253. received per system, and the total number of systems that can
  254. be heard from.  Input is ASCII and is placed in the output html file.
  255.  
  256. Urld's read buffer is not on the stack. It is limited to 1500 bytes.
  257. The size is checked via the recvfrom(2) system call.  This should
  258. limit the possibilities of any buffer overflow attacks.  
  259.  
  260. Urld does have to run as root on unix systems because it uses
  261. broadcast sockets. (Although at some point, perhaps linux will
  262. have a capability for that?).  It writes to 255.255.255.255 from the broadcast
  263. IP point of view.  This is called "limited broadcast".  Urld does
  264. not use directed broadcast.  It also cannot write messages faster
  265. than one message per second.  No message can be larger than 1500 bytes.
  266.  
  267. ---------------
  268. 5. contact us
  269.  
  270. Sumit Chawla at sumit@cs.pdx.edu
  271.  
  272. Jim Binkley at jrb@cs.pdx.edu
  273.