This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include "routing.h" | |
| // initialize the routing structure to do it directly from here | |
| int routing_init(struct config *c, char *tun_name) { | |
| FILE *fd; | |
| char buf[256]; | |
| my_short_addr = ntohs(__my_address.s6_addr16[7]); | |
| strncpy(proxy_dev, c->proxy_dev, IFNAMSIZ); | |
| strncpy(tun_dev, tun_name, IFNAMSIZ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # -*- coding: utf-8 -*- | |
| """The application's model objects""" | |
| import elixir | |
| from zope.sqlalchemy import ZopeTransactionExtension | |
| from sqlalchemy.orm import scoped_session, sessionmaker | |
| #from sqlalchemy import MetaData | |
| from sqlalchemy.ext.declarative import declarative_base |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| .coverage | |
| BeautifulSoup-3.1.0.1-py2.6.egg | |
| MANIFEST.in | |
| devdata.db | |
| dist/ldapper-0.1dev-py2.6.egg | |
| ez_setup/README.txt | |
| ez_setup/__init__.py | |
| ldapper.egg-info/PKG-INFO | |
| ldapper.egg-info/SOURCES.txt | |
| ldapper.egg-info/dependency_links.txt |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Untracked files: | |
| .coverage | |
| BeautifulSoup-3.1.0.1-py2.6.egg | |
| MANIFEST.in | |
| devdata.db | |
| dist/ldapper-0.1dev-py2.6.egg | |
| ez_setup/README.txt | |
| ez_setup/__init__.py | |
| ldapper.egg-info/PKG-INFO | |
| ldapper.egg-info/SOURCES.txt |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // -*- compile-command: "gcc -Wall chunker.c -o chunker" -*- | |
| // TODO: add one End Of Packet packet which means end of transmission for packet with seq_no | |
| // TODO: check integer division | |
| // TODO: send the raw packets generated via the tun device | |
| // TODO: use perror to print out errors when possible | |
| // TODO: set first the packet to all 0 and only set the needed fields | |
| #include <stdlib.h> | |
| #include <stdio.h> | |
| #include <netinet/ip6.h> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdlib.h> | |
| #include <stdio.h> | |
| #include <netinet/ip6.h> | |
| #include <stdint.h> | |
| #include <string.h> | |
| #include <sys/socket.h> | |
| #include <assert.h> | |
| // measures in bytes | |
| #define SIZE_IPV6_HEADER 40 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <string.h> | |
| #include <unistd.h> | |
| #include <sys/socket.h> | |
| #include <sys/ioctl.h> | |
| #include <sys/stat.h> | |
| #include <fcntl.h> | |
| #include <linux/if.h> | |
| #include <linux/if_tun.h> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // see http://www.zlib.net/manual.html for more info | |
| #include <stdio.h> | |
| #include <string.h> | |
| #include <assert.h> | |
| #include "../shared/structs.h" | |
| #include "zlib.h" | |
| /* see if the dimension is important or not */ | |
| #define LEVEL Z_BEST_COMPRESSION |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| """ | |
| Take some data, send it to the device | |
| TODO: make the compression an option which could be also disabled | |
| TODO: setup a nice logger | |
| """ | |
| # from TOSSIM import Tossim, SerialForwarder, Throttle | |
| import os | |
| import zlib |