mirror of
				https://github.com/yggdrasil-network/water.git
				synced 2025-11-04 11:15:10 +03:00 
			
		
		
		
	Create gh-pages branch via GitHub
This commit is contained in:
		
						commit
						7f168c0d95
					
				
					 7 changed files with 646 additions and 0 deletions
				
			
		
							
								
								
									
										
											BIN
										
									
								
								images/arrow-down.png
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								images/arrow-down.png
									
										
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| 
		 After Width: | Height: | Size: 423 B  | 
							
								
								
									
										
											BIN
										
									
								
								images/octocat-small.png
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										
											BIN
										
									
								
								images/octocat-small.png
									
										
									
									
									
										Normal file
									
								
							
										
											Binary file not shown.
										
									
								
							| 
		 After Width: | Height: | Size: 570 B  | 
							
								
								
									
										143
									
								
								index.html
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										143
									
								
								index.html
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,143 @@
 | 
			
		|||
<!doctype html>
 | 
			
		||||
<html>
 | 
			
		||||
  <head>
 | 
			
		||||
    <meta charset="utf-8">
 | 
			
		||||
    <meta http-equiv="X-UA-Compatible" content="chrome=1">
 | 
			
		||||
    <title>Water by songgao</title>
 | 
			
		||||
 | 
			
		||||
    <link rel="stylesheet" href="stylesheets/styles.css">
 | 
			
		||||
    <link rel="stylesheet" href="stylesheets/pygment_trac.css">
 | 
			
		||||
    <script src="javascripts/scale.fix.js"></script>
 | 
			
		||||
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
 | 
			
		||||
    <!--[if lt IE 9]>
 | 
			
		||||
    <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
 | 
			
		||||
    <![endif]-->
 | 
			
		||||
  </head>
 | 
			
		||||
  <body>
 | 
			
		||||
    <div class="wrapper">
 | 
			
		||||
      <header>
 | 
			
		||||
        <h1 class="header">Water</h1>
 | 
			
		||||
        <p class="header">A simple TUN/TAP library written in native Go.</p>
 | 
			
		||||
 | 
			
		||||
        <ul>
 | 
			
		||||
          <li class="download"><a class="buttons" href="https://github.com/songgao/water/zipball/master">Download ZIP</a></li>
 | 
			
		||||
          <li class="download"><a class="buttons" href="https://github.com/songgao/water/tarball/master">Download TAR</a></li>
 | 
			
		||||
          <li><a class="buttons github" href="https://github.com/songgao/water">View On GitHub</a></li>
 | 
			
		||||
        </ul>
 | 
			
		||||
 | 
			
		||||
        <p class="header">This project is maintained by <a class="header name" href="https://github.com/songgao">songgao</a></p>
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
      </header>
 | 
			
		||||
      <section>
 | 
			
		||||
        <h1>water</h1>
 | 
			
		||||
 | 
			
		||||
<p><code>water</code> is a native Go library for <a href="http://en.wikipedia.org/wiki/TUN/TAP">TUN/TAP</a> interfaces.</p>
 | 
			
		||||
 | 
			
		||||
<p><code>water</code> is designed to be simple and efficient. It</p>
 | 
			
		||||
 | 
			
		||||
<ul>
 | 
			
		||||
<li>wraps almost only syscalls and uses only Go standard types;</li>
 | 
			
		||||
<li>exposes standard interfaces; plays well with standard packages like <code>io</code>, <code>bufio</code>, etc..</li>
 | 
			
		||||
<li>does not handle memory management (allocating/destructing slice). It's up to user to decide how to deal with buffers; whether to use GC.</li>
 | 
			
		||||
</ul><p><code>water/waterutil</code> has some useful functions to interpret MAC farme headers and IP packet headers. It also contains some constants such as protocol numbers and ethernet frame types.</p>
 | 
			
		||||
 | 
			
		||||
<h2>Installation</h2>
 | 
			
		||||
 | 
			
		||||
<pre><code>go get -u github.com/songgao/water
 | 
			
		||||
go get -u github.com/songgao/water/waterutil
 | 
			
		||||
</code></pre>
 | 
			
		||||
 | 
			
		||||
<h2>Documentation</h2>
 | 
			
		||||
 | 
			
		||||
<p><a href="http://godoc.org/github.com/songgao/water">http://godoc.org/github.com/songgao/water</a></p>
 | 
			
		||||
 | 
			
		||||
<p><a href="http://godoc.org/github.com/songgao/water/waterutil">http://godoc.org/github.com/songgao/water/waterutil</a></p>
 | 
			
		||||
 | 
			
		||||
<h2>Example</h2>
 | 
			
		||||
 | 
			
		||||
<div class="highlight"><pre><span class="kn">package</span> <span class="nx">main</span>
 | 
			
		||||
 | 
			
		||||
<span class="kn">import</span> <span class="p">(</span>
 | 
			
		||||
    <span class="s">"github.com/songgao/water"</span>
 | 
			
		||||
    <span class="s">"github.com/songgao/water/waterutil"</span>
 | 
			
		||||
    <span class="s">"fmt"</span>
 | 
			
		||||
<span class="p">)</span>
 | 
			
		||||
 | 
			
		||||
<span class="kd">const</span> <span class="nx">BUFFERSIZE</span> <span class="p">=</span> <span class="mi">1522</span>
 | 
			
		||||
 | 
			
		||||
<span class="kd">func</span> <span class="nx">main</span><span class="p">()</span> <span class="p">{</span>
 | 
			
		||||
    <span class="nx">ifce</span><span class="p">,</span> <span class="nx">err</span> <span class="o">:=</span> <span class="nx">water</span><span class="p">.</span><span class="nx">NewTAP</span><span class="p">(</span><span class="s">""</span><span class="p">)</span>
 | 
			
		||||
    <span class="nx">fmt</span><span class="p">.</span><span class="nx">Printf</span><span class="p">(</span><span class="s">"%v, %v\n\n"</span><span class="p">,</span> <span class="nx">err</span><span class="p">,</span> <span class="nx">ifce</span><span class="p">)</span>
 | 
			
		||||
    <span class="nx">buffer</span> <span class="o">:=</span> <span class="nb">make</span><span class="p">([]</span><span class="kt">byte</span><span class="p">,</span> <span class="nx">BUFFERSIZE</span><span class="p">)</span>
 | 
			
		||||
    <span class="k">for</span> <span class="p">{</span>
 | 
			
		||||
        <span class="nx">_</span><span class="p">,</span> <span class="nx">err</span> <span class="p">=</span> <span class="nx">ifce</span><span class="p">.</span><span class="nx">Read</span><span class="p">(</span><span class="nx">buffer</span><span class="p">)</span>
 | 
			
		||||
        <span class="k">if</span> <span class="nx">err</span> <span class="o">!=</span> <span class="kc">nil</span> <span class="p">{</span>
 | 
			
		||||
            <span class="k">break</span>
 | 
			
		||||
        <span class="p">}</span>
 | 
			
		||||
        <span class="nx">ethertype</span> <span class="o">:=</span> <span class="nx">waterutil</span><span class="p">.</span><span class="nx">MACEthertype</span><span class="p">(</span><span class="nx">buffer</span><span class="p">)</span>
 | 
			
		||||
        <span class="k">if</span> <span class="nx">ethertype</span> <span class="o">==</span> <span class="nx">waterutil</span><span class="p">.</span><span class="nx">IPv4</span> <span class="p">{</span>
 | 
			
		||||
            <span class="nx">packet</span> <span class="o">:=</span> <span class="nx">waterutil</span><span class="p">.</span><span class="nx">MACPayload</span><span class="p">(</span><span class="nx">buffer</span><span class="p">)</span>
 | 
			
		||||
            <span class="k">if</span> <span class="nx">waterutil</span><span class="p">.</span><span class="nx">IsIPv4</span><span class="p">(</span><span class="nx">packet</span><span class="p">)</span> <span class="p">{</span>
 | 
			
		||||
                <span class="nx">fmt</span><span class="p">.</span><span class="nx">Printf</span><span class="p">(</span><span class="s">"Source:      %v [%v]\n"</span><span class="p">,</span> <span class="nx">waterutil</span><span class="p">.</span><span class="nx">MACSource</span><span class="p">(</span><span class="nx">buffer</span><span class="p">),</span> <span class="nx">waterutil</span><span class="p">.</span><span class="nx">IPv4Source</span><span class="p">(</span><span class="nx">packet</span><span class="p">))</span>
 | 
			
		||||
                <span class="nx">fmt</span><span class="p">.</span><span class="nx">Printf</span><span class="p">(</span><span class="s">"Destination: %v [%v]\n"</span><span class="p">,</span> <span class="nx">waterutil</span><span class="p">.</span><span class="nx">MACDestination</span><span class="p">(</span><span class="nx">buffer</span><span class="p">),</span> <span class="nx">waterutil</span><span class="p">.</span><span class="nx">IPv4Destination</span><span class="p">(</span><span class="nx">packet</span><span class="p">))</span>
 | 
			
		||||
                <span class="nx">fmt</span><span class="p">.</span><span class="nx">Printf</span><span class="p">(</span><span class="s">"Protocol:    %v\n\n"</span><span class="p">,</span> <span class="nx">waterutil</span><span class="p">.</span><span class="nx">IPv4Protocol</span><span class="p">(</span><span class="nx">packet</span><span class="p">))</span>
 | 
			
		||||
            <span class="p">}</span>
 | 
			
		||||
        <span class="p">}</span>
 | 
			
		||||
    <span class="p">}</span>
 | 
			
		||||
<span class="p">}</span>
 | 
			
		||||
</pre></div>
 | 
			
		||||
 | 
			
		||||
<p>This piece of code creates a <code>TAP</code> interface, and prints some header information for every IPv4 packet. After pull up the <code>main.go</code>, you'll need to bring up the interface and assign IP address. All of these need root permission.</p>
 | 
			
		||||
 | 
			
		||||
<div class="highlight"><pre>sudo go run main.go
 | 
			
		||||
</pre></div>
 | 
			
		||||
 | 
			
		||||
<div class="highlight"><pre>sudo ip link <span class="nb">set </span>dev tap0 up
 | 
			
		||||
sudo ip addr add 10.0.0.1/24 dev tap0
 | 
			
		||||
</pre></div>
 | 
			
		||||
 | 
			
		||||
<p>Now, try sending some ICMP broadcast message:</p>
 | 
			
		||||
 | 
			
		||||
<div class="highlight"><pre>ping -b 10.0.0.255
 | 
			
		||||
</pre></div>
 | 
			
		||||
 | 
			
		||||
<p>You'll see the <code>main.go</code> print something like:</p>
 | 
			
		||||
 | 
			
		||||
<pre><code><nil>, &{true 0xf84003f058 tap0}
 | 
			
		||||
 | 
			
		||||
Source:      42:35:da:af:2b:00 [10.0.0.1]
 | 
			
		||||
Destination: ff:ff:ff:ff:ff:ff [10.0.0.255]
 | 
			
		||||
Protocol:    1
 | 
			
		||||
 | 
			
		||||
Source:      42:35:da:af:2b:00 [10.0.0.1]
 | 
			
		||||
Destination: ff:ff:ff:ff:ff:ff [10.0.0.255]
 | 
			
		||||
Protocol:    1
 | 
			
		||||
 | 
			
		||||
Source:      42:35:da:af:2b:00 [10.0.0.1]
 | 
			
		||||
Destination: ff:ff:ff:ff:ff:ff [10.0.0.255]
 | 
			
		||||
Protocol:    1
 | 
			
		||||
</code></pre>
 | 
			
		||||
 | 
			
		||||
<h2>TODO</h2>
 | 
			
		||||
 | 
			
		||||
<ul>
 | 
			
		||||
<li>IPv6 Support in <code>waterutil</code>
 | 
			
		||||
</li>
 | 
			
		||||
<li>Darwin(Mac) Support</li>
 | 
			
		||||
</ul><h2>LICENSE</h2>
 | 
			
		||||
 | 
			
		||||
<p>GNU LESSER GENERAL PUBLIC LICENSE Version 3</p>
 | 
			
		||||
 | 
			
		||||
<h2>Alternatives</h2>
 | 
			
		||||
 | 
			
		||||
<p><code>tuntap</code>: <a href="https://code.google.com/p/tuntap/">https://code.google.com/p/tuntap/</a></p>
 | 
			
		||||
      </section>
 | 
			
		||||
      <footer>
 | 
			
		||||
        <p><small>Hosted on <a href="https://pages.github.com">GitHub Pages</a> using the Dinky theme</small></p>
 | 
			
		||||
      </footer>
 | 
			
		||||
    </div>
 | 
			
		||||
    <!--[if !IE]><script>fixScale(document);</script><![endif]-->
 | 
			
		||||
		
 | 
			
		||||
  </body>
 | 
			
		||||
</html>
 | 
			
		||||
							
								
								
									
										20
									
								
								javascripts/scale.fix.js
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										20
									
								
								javascripts/scale.fix.js
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,20 @@
 | 
			
		|||
fixScale = function(doc) {
 | 
			
		||||
 | 
			
		||||
	var addEvent = 'addEventListener',
 | 
			
		||||
	    type = 'gesturestart',
 | 
			
		||||
	    qsa = 'querySelectorAll',
 | 
			
		||||
	    scales = [1, 1],
 | 
			
		||||
	    meta = qsa in doc ? doc[qsa]('meta[name=viewport]') : [];
 | 
			
		||||
 | 
			
		||||
	function fix() {
 | 
			
		||||
		meta.content = 'width=device-width,minimum-scale=' + scales[0] + ',maximum-scale=' + scales[1];
 | 
			
		||||
		doc.removeEventListener(type, fix, true);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if ((meta = meta[meta.length - 1]) && addEvent in doc) {
 | 
			
		||||
		fix();
 | 
			
		||||
		scales = [.25, 1.6];
 | 
			
		||||
		doc[addEvent](type, fix, true);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
};
 | 
			
		||||
							
								
								
									
										1
									
								
								params.json
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								params.json
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1 @@
 | 
			
		|||
{"name":"Water","tagline":"A simple TUN/TAP library written in native Go.","body":"# water\r\n`water` is a native Go library for [TUN/TAP](http://en.wikipedia.org/wiki/TUN/TAP) interfaces.\r\n\r\n`water` is designed to be simple and efficient. It\r\n\r\n* wraps almost only syscalls and uses only Go standard types;\r\n* exposes standard interfaces; plays well with standard packages like `io`, `bufio`, etc..\r\n* does not handle memory management (allocating/destructing slice). It's up to user to decide how to deal with buffers; whether to use GC.\r\n\r\n`water/waterutil` has some useful functions to interpret MAC farme headers and IP packet headers. It also contains some constants such as protocol numbers and ethernet frame types.\r\n\r\n## Installation\r\n```\r\ngo get -u github.com/songgao/water\r\ngo get -u github.com/songgao/water/waterutil\r\n```\r\n\r\n## Documentation\r\n[http://godoc.org/github.com/songgao/water](http://godoc.org/github.com/songgao/water)\r\n\r\n[http://godoc.org/github.com/songgao/water/waterutil](http://godoc.org/github.com/songgao/water/waterutil)\r\n\r\n## Example\r\n\r\n```go\r\npackage main\r\n\r\nimport (\r\n\t\"github.com/songgao/water\"\r\n\t\"github.com/songgao/water/waterutil\"\r\n\t\"fmt\"\r\n)\r\n\r\nconst BUFFERSIZE = 1522\r\n\r\nfunc main() {\r\n\tifce, err := water.NewTAP(\"\")\r\n\tfmt.Printf(\"%v, %v\\n\\n\", err, ifce)\r\n\tbuffer := make([]byte, BUFFERSIZE)\r\n\tfor {\r\n\t\t_, err = ifce.Read(buffer)\r\n\t\tif err != nil {\r\n\t\t\tbreak\r\n\t\t}\r\n\t\tethertype := waterutil.MACEthertype(buffer)\r\n\t\tif ethertype == waterutil.IPv4 {\r\n\t\t\tpacket := waterutil.MACPayload(buffer)\r\n\t\t\tif waterutil.IsIPv4(packet) {\r\n\t\t\t\tfmt.Printf(\"Source:      %v [%v]\\n\", waterutil.MACSource(buffer), waterutil.IPv4Source(packet))\r\n\t\t\t\tfmt.Printf(\"Destination: %v [%v]\\n\", waterutil.MACDestination(buffer), waterutil.IPv4Destination(packet))\r\n\t\t\t\tfmt.Printf(\"Protocol:    %v\\n\\n\", waterutil.IPv4Protocol(packet))\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n}\r\n```\r\n\r\nThis piece of code creates a `TAP` interface, and prints some header information for every IPv4 packet. After pull up the `main.go`, you'll need to bring up the interface and assign IP address. All of these need root permission.\r\n\r\n```bash\r\nsudo go run main.go\r\n```\r\n\r\n```bash\r\nsudo ip link set dev tap0 up\r\nsudo ip addr add 10.0.0.1/24 dev tap0\r\n```\r\n\r\nNow, try sending some ICMP broadcast message:\r\n```bash\r\nping -b 10.0.0.255\r\n```\r\n\r\nYou'll see the `main.go` print something like:\r\n```\r\n<nil>, &{true 0xf84003f058 tap0}\r\n\r\nSource:      42:35:da:af:2b:00 [10.0.0.1]\r\nDestination: ff:ff:ff:ff:ff:ff [10.0.0.255]\r\nProtocol:    1\r\n\r\nSource:      42:35:da:af:2b:00 [10.0.0.1]\r\nDestination: ff:ff:ff:ff:ff:ff [10.0.0.255]\r\nProtocol:    1\r\n\r\nSource:      42:35:da:af:2b:00 [10.0.0.1]\r\nDestination: ff:ff:ff:ff:ff:ff [10.0.0.255]\r\nProtocol:    1\r\n```\r\n\r\n## TODO\r\n* IPv6 Support in `waterutil`\r\n* Darwin(Mac) Support\r\n\r\n## LICENSE\r\nGNU LESSER GENERAL PUBLIC LICENSE Version 3\r\n\r\n## Alternatives\r\n`tuntap`: [https://code.google.com/p/tuntap/](https://code.google.com/p/tuntap/)\r\n","google":"","note":"Don't delete this file! It's used internally to help with page regeneration."}
 | 
			
		||||
							
								
								
									
										69
									
								
								stylesheets/pygment_trac.css
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										69
									
								
								stylesheets/pygment_trac.css
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,69 @@
 | 
			
		|||
.highlight  { background: #ffffff; }
 | 
			
		||||
.highlight .c { color: #999988; font-style: italic } /* Comment */
 | 
			
		||||
.highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */
 | 
			
		||||
.highlight .k { font-weight: bold } /* Keyword */
 | 
			
		||||
.highlight .o { font-weight: bold } /* Operator */
 | 
			
		||||
.highlight .cm { color: #999988; font-style: italic } /* Comment.Multiline */
 | 
			
		||||
.highlight .cp { color: #999999; font-weight: bold } /* Comment.Preproc */
 | 
			
		||||
.highlight .c1 { color: #999988; font-style: italic } /* Comment.Single */
 | 
			
		||||
.highlight .cs { color: #999999; font-weight: bold; font-style: italic } /* Comment.Special */
 | 
			
		||||
.highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */
 | 
			
		||||
.highlight .gd .x { color: #000000; background-color: #ffaaaa } /* Generic.Deleted.Specific */
 | 
			
		||||
.highlight .ge { font-style: italic } /* Generic.Emph */
 | 
			
		||||
.highlight .gr { color: #aa0000 } /* Generic.Error */
 | 
			
		||||
.highlight .gh { color: #999999 } /* Generic.Heading */
 | 
			
		||||
.highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */
 | 
			
		||||
.highlight .gi .x { color: #000000; background-color: #aaffaa } /* Generic.Inserted.Specific */
 | 
			
		||||
.highlight .go { color: #888888 } /* Generic.Output */
 | 
			
		||||
.highlight .gp { color: #555555 } /* Generic.Prompt */
 | 
			
		||||
.highlight .gs { font-weight: bold } /* Generic.Strong */
 | 
			
		||||
.highlight .gu { color: #800080; font-weight: bold; } /* Generic.Subheading */
 | 
			
		||||
.highlight .gt { color: #aa0000 } /* Generic.Traceback */
 | 
			
		||||
.highlight .kc { font-weight: bold } /* Keyword.Constant */
 | 
			
		||||
.highlight .kd { font-weight: bold } /* Keyword.Declaration */
 | 
			
		||||
.highlight .kn { font-weight: bold } /* Keyword.Namespace */
 | 
			
		||||
.highlight .kp { font-weight: bold } /* Keyword.Pseudo */
 | 
			
		||||
.highlight .kr { font-weight: bold } /* Keyword.Reserved */
 | 
			
		||||
.highlight .kt { color: #445588; font-weight: bold } /* Keyword.Type */
 | 
			
		||||
.highlight .m { color: #009999 } /* Literal.Number */
 | 
			
		||||
.highlight .s { color: #d14 } /* Literal.String */
 | 
			
		||||
.highlight .na { color: #008080 } /* Name.Attribute */
 | 
			
		||||
.highlight .nb { color: #0086B3 } /* Name.Builtin */
 | 
			
		||||
.highlight .nc { color: #445588; font-weight: bold } /* Name.Class */
 | 
			
		||||
.highlight .no { color: #008080 } /* Name.Constant */
 | 
			
		||||
.highlight .ni { color: #800080 } /* Name.Entity */
 | 
			
		||||
.highlight .ne { color: #990000; font-weight: bold } /* Name.Exception */
 | 
			
		||||
.highlight .nf { color: #990000; font-weight: bold } /* Name.Function */
 | 
			
		||||
.highlight .nn { color: #555555 } /* Name.Namespace */
 | 
			
		||||
.highlight .nt { color: #000080 } /* Name.Tag */
 | 
			
		||||
.highlight .nv { color: #008080 } /* Name.Variable */
 | 
			
		||||
.highlight .ow { font-weight: bold } /* Operator.Word */
 | 
			
		||||
.highlight .w { color: #bbbbbb } /* Text.Whitespace */
 | 
			
		||||
.highlight .mf { color: #009999 } /* Literal.Number.Float */
 | 
			
		||||
.highlight .mh { color: #009999 } /* Literal.Number.Hex */
 | 
			
		||||
.highlight .mi { color: #009999 } /* Literal.Number.Integer */
 | 
			
		||||
.highlight .mo { color: #009999 } /* Literal.Number.Oct */
 | 
			
		||||
.highlight .sb { color: #d14 } /* Literal.String.Backtick */
 | 
			
		||||
.highlight .sc { color: #d14 } /* Literal.String.Char */
 | 
			
		||||
.highlight .sd { color: #d14 } /* Literal.String.Doc */
 | 
			
		||||
.highlight .s2 { color: #d14 } /* Literal.String.Double */
 | 
			
		||||
.highlight .se { color: #d14 } /* Literal.String.Escape */
 | 
			
		||||
.highlight .sh { color: #d14 } /* Literal.String.Heredoc */
 | 
			
		||||
.highlight .si { color: #d14 } /* Literal.String.Interpol */
 | 
			
		||||
.highlight .sx { color: #d14 } /* Literal.String.Other */
 | 
			
		||||
.highlight .sr { color: #009926 } /* Literal.String.Regex */
 | 
			
		||||
.highlight .s1 { color: #d14 } /* Literal.String.Single */
 | 
			
		||||
.highlight .ss { color: #990073 } /* Literal.String.Symbol */
 | 
			
		||||
.highlight .bp { color: #999999 } /* Name.Builtin.Pseudo */
 | 
			
		||||
.highlight .vc { color: #008080 } /* Name.Variable.Class */
 | 
			
		||||
.highlight .vg { color: #008080 } /* Name.Variable.Global */
 | 
			
		||||
.highlight .vi { color: #008080 } /* Name.Variable.Instance */
 | 
			
		||||
.highlight .il { color: #009999 } /* Literal.Number.Integer.Long */
 | 
			
		||||
 | 
			
		||||
.type-csharp .highlight .k { color: #0000FF }
 | 
			
		||||
.type-csharp .highlight .kt { color: #0000FF }
 | 
			
		||||
.type-csharp .highlight .nf { color: #000000; font-weight: normal }
 | 
			
		||||
.type-csharp .highlight .nc { color: #2B91AF }
 | 
			
		||||
.type-csharp .highlight .nn { color: #000000 }
 | 
			
		||||
.type-csharp .highlight .s { color: #A31515 }
 | 
			
		||||
.type-csharp .highlight .sc { color: #A31515 }
 | 
			
		||||
							
								
								
									
										413
									
								
								stylesheets/styles.css
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										413
									
								
								stylesheets/styles.css
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,413 @@
 | 
			
		|||
@import url(https://fonts.googleapis.com/css?family=Arvo:400,700,400italic);
 | 
			
		||||
 | 
			
		||||
/* MeyerWeb Reset */
 | 
			
		||||
 | 
			
		||||
html, body, div, span, applet, object, iframe,
 | 
			
		||||
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
 | 
			
		||||
a, abbr, acronym, address, big, cite, code,
 | 
			
		||||
del, dfn, em, img, ins, kbd, q, s, samp,
 | 
			
		||||
small, strike, strong, sub, sup, tt, var,
 | 
			
		||||
b, u, i, center,
 | 
			
		||||
dl, dt, dd, ol, ul, li,
 | 
			
		||||
fieldset, form, label, legend,
 | 
			
		||||
table, caption, tbody, tfoot, thead, tr, th, td,
 | 
			
		||||
article, aside, canvas, details, embed,
 | 
			
		||||
figure, figcaption, footer, header, hgroup,
 | 
			
		||||
menu, nav, output, ruby, section, summary,
 | 
			
		||||
time, mark, audio, video {
 | 
			
		||||
  margin: 0;
 | 
			
		||||
  padding: 0;
 | 
			
		||||
  border: 0;
 | 
			
		||||
  font: inherit;
 | 
			
		||||
  vertical-align: baseline;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/* Base text styles */
 | 
			
		||||
 | 
			
		||||
body {
 | 
			
		||||
  padding:10px 50px 0 0;
 | 
			
		||||
  font-family:"Helvetica Neue", Helvetica, Arial, sans-serif;
 | 
			
		||||
	font-size: 14px;
 | 
			
		||||
	color: #232323;
 | 
			
		||||
	background-color: #FBFAF7;
 | 
			
		||||
	margin: 0;
 | 
			
		||||
	line-height: 1.8em;
 | 
			
		||||
	-webkit-font-smoothing: antialiased;
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
h1, h2, h3, h4, h5, h6 {
 | 
			
		||||
  color:#232323;
 | 
			
		||||
  margin:36px 0 10px;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
p, ul, ol, table, dl {
 | 
			
		||||
  margin:0 0 22px;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
h1, h2, h3 {
 | 
			
		||||
	font-family: Arvo, Monaco, serif;
 | 
			
		||||
  line-height:1.3;
 | 
			
		||||
	font-weight: normal;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
h1,h2, h3 {
 | 
			
		||||
	display: block;
 | 
			
		||||
	border-bottom: 1px solid #ccc;
 | 
			
		||||
	padding-bottom: 5px;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
h1 {
 | 
			
		||||
	font-size: 30px;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
h2 {
 | 
			
		||||
	font-size: 24px;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
h3 {
 | 
			
		||||
	font-size: 18px;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
h4, h5, h6 {
 | 
			
		||||
	font-family: Arvo, Monaco, serif;
 | 
			
		||||
	font-weight: 700;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
a {
 | 
			
		||||
  color:#C30000;
 | 
			
		||||
  font-weight:200;
 | 
			
		||||
  text-decoration:none;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
a:hover {
 | 
			
		||||
	text-decoration: underline;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
a small {
 | 
			
		||||
	font-size: 12px;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
em {
 | 
			
		||||
	font-style: italic;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
strong {
 | 
			
		||||
  font-weight:700;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
ul li {
 | 
			
		||||
  list-style: inside;
 | 
			
		||||
  padding-left: 25px;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
ol li {
 | 
			
		||||
  list-style: decimal inside;
 | 
			
		||||
  padding-left: 20px;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
blockquote {
 | 
			
		||||
  margin: 0;
 | 
			
		||||
  padding: 0 0 0 20px;
 | 
			
		||||
  font-style: italic;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
dl, dt, dd, dl p {
 | 
			
		||||
	font-color: #444;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
dl dt {
 | 
			
		||||
  font-weight: bold;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
dl dd {
 | 
			
		||||
  padding-left: 20px;
 | 
			
		||||
  font-style: italic;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
dl p {
 | 
			
		||||
  padding-left: 20px;
 | 
			
		||||
  font-style: italic;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
hr {
 | 
			
		||||
  border:0;
 | 
			
		||||
  background:#ccc;
 | 
			
		||||
  height:1px;
 | 
			
		||||
  margin:0 0 24px;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/* Images */
 | 
			
		||||
 | 
			
		||||
img {
 | 
			
		||||
  position: relative;
 | 
			
		||||
  margin: 0 auto;
 | 
			
		||||
  max-width: 650px;
 | 
			
		||||
  padding: 5px;
 | 
			
		||||
  margin: 10px 0 32px 0;
 | 
			
		||||
  border: 1px solid #ccc;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/* Code blocks */
 | 
			
		||||
 | 
			
		||||
code, pre {
 | 
			
		||||
	font-family: Monaco, "Bitstream Vera Sans Mono", "Lucida Console", Terminal, monospace;
 | 
			
		||||
  color:#000;
 | 
			
		||||
  font-size:14px;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
pre {
 | 
			
		||||
	padding: 4px 12px;
 | 
			
		||||
  background: #FDFEFB;
 | 
			
		||||
  border-radius:4px;
 | 
			
		||||
  border:1px solid #D7D8C8;
 | 
			
		||||
  overflow: auto;
 | 
			
		||||
  overflow-y: hidden;
 | 
			
		||||
	margin-bottom: 32px;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/* Tables */
 | 
			
		||||
 | 
			
		||||
table {
 | 
			
		||||
  width:100%;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
table {
 | 
			
		||||
  border: 1px solid #ccc;
 | 
			
		||||
  margin-bottom: 32px;
 | 
			
		||||
  text-align: left;
 | 
			
		||||
 }
 | 
			
		||||
 | 
			
		||||
th {
 | 
			
		||||
  font-family: 'Arvo', Helvetica, Arial, sans-serif;
 | 
			
		||||
	font-size: 18px;
 | 
			
		||||
	font-weight: normal;
 | 
			
		||||
  padding: 10px;
 | 
			
		||||
  background: #232323;
 | 
			
		||||
  color: #FDFEFB;
 | 
			
		||||
 }
 | 
			
		||||
 | 
			
		||||
td {
 | 
			
		||||
  padding: 10px;
 | 
			
		||||
	background: #ccc;
 | 
			
		||||
 }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/* Wrapper */
 | 
			
		||||
.wrapper {
 | 
			
		||||
  width:960px;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/* Header */
 | 
			
		||||
 | 
			
		||||
header {
 | 
			
		||||
	background-color: #171717;
 | 
			
		||||
	color: #FDFDFB;
 | 
			
		||||
  width:170px;
 | 
			
		||||
  float:left;
 | 
			
		||||
  position:fixed;
 | 
			
		||||
	border: 1px solid #000;
 | 
			
		||||
	-webkit-border-top-right-radius: 4px;
 | 
			
		||||
	-webkit-border-bottom-right-radius: 4px;
 | 
			
		||||
	-moz-border-radius-topright: 4px;
 | 
			
		||||
	-moz-border-radius-bottomright: 4px;
 | 
			
		||||
	border-top-right-radius: 4px;
 | 
			
		||||
	border-bottom-right-radius: 4px;
 | 
			
		||||
	padding: 34px 25px 22px 50px;
 | 
			
		||||
	margin: 30px 25px 0 0;
 | 
			
		||||
	-webkit-font-smoothing: antialiased;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
p.header {
 | 
			
		||||
	font-size: 16px;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
h1.header {
 | 
			
		||||
	font-family: Arvo, sans-serif;
 | 
			
		||||
	font-size: 30px;
 | 
			
		||||
	font-weight: 300;
 | 
			
		||||
	line-height: 1.3em;
 | 
			
		||||
	border-bottom: none;
 | 
			
		||||
	margin-top: 0;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
h1.header, a.header, a.name, header a{
 | 
			
		||||
	color: #fff;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
a.header {
 | 
			
		||||
	text-decoration: underline;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
a.name {
 | 
			
		||||
	white-space: nowrap;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
header ul {
 | 
			
		||||
  list-style:none;
 | 
			
		||||
  padding:0;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
header li {
 | 
			
		||||
	list-style-type: none;
 | 
			
		||||
  width:132px;
 | 
			
		||||
  height:15px;
 | 
			
		||||
	margin-bottom: 12px;
 | 
			
		||||
	line-height: 1em;
 | 
			
		||||
	padding: 6px 6px 6px 7px;
 | 
			
		||||
 | 
			
		||||
	background: #AF0011;
 | 
			
		||||
	background: -moz-linear-gradient(top, #AF0011 0%, #820011 100%);
 | 
			
		||||
  background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#f8f8f8), color-stop(100%,#dddddd));
 | 
			
		||||
  background: -webkit-linear-gradient(top, #AF0011 0%,#820011 100%);
 | 
			
		||||
  background: -o-linear-gradient(top, #AF0011 0%,#820011 100%);
 | 
			
		||||
  background: -ms-linear-gradient(top, #AF0011 0%,#820011 100%);
 | 
			
		||||
  background: linear-gradient(top, #AF0011 0%,#820011 100%);
 | 
			
		||||
 | 
			
		||||
	border-radius:4px;
 | 
			
		||||
  border:1px solid #0D0D0D;
 | 
			
		||||
 | 
			
		||||
	-webkit-box-shadow: inset 0px 1px 1px 0 rgba(233,2,38, 1);
 | 
			
		||||
	box-shadow: inset 0px 1px 1px 0 rgba(233,2,38, 1);
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
header li:hover {
 | 
			
		||||
	background: #C3001D;
 | 
			
		||||
	background: -moz-linear-gradient(top, #C3001D 0%, #950119 100%);
 | 
			
		||||
  background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#f8f8f8), color-stop(100%,#dddddd));
 | 
			
		||||
  background: -webkit-linear-gradient(top, #C3001D 0%,#950119 100%);
 | 
			
		||||
  background: -o-linear-gradient(top, #C3001D 0%,#950119 100%);
 | 
			
		||||
  background: -ms-linear-gradient(top, #C3001D 0%,#950119 100%);
 | 
			
		||||
  background: linear-gradient(top, #C3001D 0%,#950119 100%);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
a.buttons {
 | 
			
		||||
	-webkit-font-smoothing: antialiased;
 | 
			
		||||
	background: url(../images/arrow-down.png) no-repeat;
 | 
			
		||||
	font-weight: normal;
 | 
			
		||||
	text-shadow: rgba(0, 0, 0, 0.4) 0 -1px 0;
 | 
			
		||||
	padding: 2px 2px 2px 22px;
 | 
			
		||||
	height: 30px;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
a.github {
 | 
			
		||||
	background: url(../images/octocat-small.png) no-repeat 1px;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
a.buttons:hover {
 | 
			
		||||
	color: #fff;
 | 
			
		||||
	text-decoration: none;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/* Section - for main page content */
 | 
			
		||||
 | 
			
		||||
section {
 | 
			
		||||
  width:650px;
 | 
			
		||||
  float:right;
 | 
			
		||||
  padding-bottom:50px;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
/* Footer */
 | 
			
		||||
 | 
			
		||||
footer {
 | 
			
		||||
  width:170px;
 | 
			
		||||
  float:left;
 | 
			
		||||
  position:fixed;
 | 
			
		||||
  bottom:10px;
 | 
			
		||||
	padding-left: 50px;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@media print, screen and (max-width: 960px) {
 | 
			
		||||
 | 
			
		||||
  div.wrapper {
 | 
			
		||||
    width:auto;
 | 
			
		||||
    margin:0;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  header, section, footer {
 | 
			
		||||
    float:none;
 | 
			
		||||
    position:static;
 | 
			
		||||
    width:auto;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
	footer {
 | 
			
		||||
		border-top: 1px solid #ccc;
 | 
			
		||||
		margin:0 84px 0 50px;
 | 
			
		||||
		padding:0;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
  header {
 | 
			
		||||
    padding-right:320px;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  section {
 | 
			
		||||
    padding:20px 84px 20px 50px;
 | 
			
		||||
    margin:0 0 20px;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  header a small {
 | 
			
		||||
    display:inline;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  header ul {
 | 
			
		||||
    position:absolute;
 | 
			
		||||
    right:130px;
 | 
			
		||||
    top:84px;
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@media print, screen and (max-width: 720px) {
 | 
			
		||||
  body {
 | 
			
		||||
    word-wrap:break-word;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  header {
 | 
			
		||||
    padding:10px 20px 0;
 | 
			
		||||
		margin-right: 0;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
	section {
 | 
			
		||||
    padding:10px 0 10px 20px;
 | 
			
		||||
    margin:0 0 30px;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
	footer {
 | 
			
		||||
		margin: 0 0 0 30px;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
  header ul, header p.view {
 | 
			
		||||
    position:static;
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@media print, screen and (max-width: 480px) {
 | 
			
		||||
 | 
			
		||||
  header ul li.download {
 | 
			
		||||
    display:none;
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
	footer {
 | 
			
		||||
		margin: 0 0 0 20px;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	footer a{
 | 
			
		||||
		display:block;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@media print {
 | 
			
		||||
  body {
 | 
			
		||||
    padding:0.4in;
 | 
			
		||||
    font-size:12pt;
 | 
			
		||||
    color:#444;
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue