User Tools

Site Tools


opus:fall2012:thakes3:part2

Part 2

Entries

Entry 1: October 10, 2012

Whew, haven't done this in a while.

Starting to read the Beej's guide to network programming. Haas has stated that if I can write network code independent of resources I will receive an A in datacom.

OK DONE

Entry 2: October 26, 2012

Today i'm putting a huge dent into this network programming. So far I have learned that programming in windows is kinda insane, and with unix it provides a greater learning environment.

There are two main structures used in network programming (for c++), struct sockaddr and struct sockaddr_in. The last one is how sane people structure the program so it can travel over the internet. Within that struct contains a unsigned short int for the port and a short int for the address family.

Entry 3: October Day, 2012

This is a sample format for a dated entry. Please substitute the actual date for “Month Day, Year”, and duplicate the level 4 heading to make additional entries.

As an aid, feel free to use the following questions to help you generate content for your entries:

  • What action or concept of significance, as related to the course, did you experience on this date?
  • Why was this significant?
  • What concepts are you dealing with that may not make perfect sense?
  • What challenges are you facing with respect to the course?

Remember that 4 is just the minimum number of entries. Feel free to have more.

Entry 4: October 31, 2012

Trick or Treat!

YEA IM GETTIN SOME CANDY

Y.U.M. = Yellowdog Updater Modified R.P.M. = Redhat Package Manager

It seems there is a great difference between these two. They are both structured over the rpm distributions and they cannot be ported to debian based distros like Ubuntu. YUM > RPM because it can install the dependencies for you. That means if you don't know how to exactly configure the dependent programs, it will do it for you.

Keywords

data Keyword 2

array vs. linked list (pros/cons)

Definition

An array is a simpler, easier format for multiple value storage. You do not need to go threw the list in an array, you can use that element of the array. Linked lists have no benefits.

data Keyword 2 Phase 2

stack pop operation

Definition

Stack is a data structure that is used to keep things in order. A stack allows adding and removing items in order. When something is added to the stack it goes to the top of the stack, and the first item added to the stack is the last item to be removed.Pop is the operation used to remove an item from a stack.

References

List any sites, books, or sources utilized when researching information on this topic. (Remove any filler text).

  • Wikipedia
  • class
  • c book

Demonstration

Demonstration of the indicated keyword.

This is an edited version of the code on wikipedia. <code c> void push(STACK head, int value) {

  STACK *node = malloc(sizeof(STACK));  /* create a new node */

if (node == NULL){

      printf("Error: no space available for node\n");
      abort();
  } else {                                    
      node->data = value;
      node->next = empty(*head) ? NULL : *head; /* insert new head if any */
      *head = node;
  }

} </code>

datacomm Keyword 2

Network Socket

Definition

It is an endpoint for network communication.

References

Wikipedia

datacomm Keyword 2 Phase 2

FireWire Network

Definition

A way to transfer and share files between computers using only one wire between the computers.

References

Demonstration

Demonstration of the indicated keyword.

If you wish to aid your definition with a code sample, you can do so by using a wiki code block, an example follows:

/*
 * Sample code block
 */
#include <stdio.h>
 
int main()
{
    return(0);
}

Alternatively (or additionally), if you want to demonstrate something on the command-line, you can do so as follows:

lab46:~$ cd src
lab46:~/src$ gcc -o hello hello.c
lab46:~/src$ ./hello
Hello, World!
lab46:~/src$ 

hpc1 Keyword 2

make

Definition

make is the gnu utilities to maintain large groups of programs.

References

wikipedia

hpc1 Keyword 2 Phase 2

make

Definition

make is the gnu utilities to maintain large groups of programs.

References

wikipedia

Demonstration

Demonstration of the indicated keyword.

CFLAGS = -Wall
INC =
CC = gcc $(CFLAGS) $(INC)
SRC = $(shell /bin/ls -1 *.c)
OBJ = $(SRC:.c=.o)
BIN = linkedlistprog
all: $(SRC) $(OBJ) $(BIN)
 
debug: CC += -DDEBUG -g
debug: DEBUG = debug
debug: $(SRC) $(OBJ) $(BIN)
 
linkedlistprog:
ifneq ($(MAKECMDGOALS),debug)
    @printf "[B]   %-20s ... " "$(BIN)"
    @$(CC) -o $(BIN) $(OBJ) && echo "OK" || echo "FAIL"
else
    $(CC) -o $(BIN) $(OBJ)
endif
 
 
.c.o:
ifneq ($(MAKECMDGOALS),debug)
    @printf "[B]   %-20s ... " "$<"
    @$(CC) -c $< && echo "OK" || echo "FAIL"
else
    $(CC) -c $<
endif
 
copy:
    mkdir -p ~/src/data/linkedlist1
    cp -v /var/public/data/fall2012/linkedlist1/* ~/src/data/linkedlist1/
 
clean:
    rm -f $(OBJ) $(BIN) core

Experiment 2

Onion Routing

Resources

Hypothesis

Everything you do on the internet is being surveillance. You are never alone on the web, there are always dark forces making sure you're not breaking any laws. Of course, there are ways around being tracked all the time.

One is by the use of onion routing. By bouncing off an onion router, you are able to change your ip and travel the web through a sort of pseudo encrypted environment.

Experiment

In my experiment, I will try to access a blocked website through the campus network connection, then try to connect through onion routing.

Data

I began by trying to go somewhere blocked. Lets say 4chan /g/. When I try to visit the page I get a blocked message by the sonic wall.

So I begin by downloading a tor web browser. This uses a pre configured environment that allows travel via the onion network.

by untaring the folder and running the browser, it begins forwarding the ports through the network.

Once set up, we try the link again.

success, it travels through the network and into the web

Analysis

Based on the data collected:

  • Was your hypothesis correct? yes
  • Was your hypothesis not applicable? no
  • Is there more going on than you originally thought? (shortcomings in hypothesis) nope
  • What shortcomings might there be in your experiment? none
  • What shortcomings might there be in your data? yes

Conclusions

I need to use this more often

opus/fall2012/thakes3/part2.txt · Last modified: 2012/10/31 23:39 by thakes3