Functions

Functions

Program: Broken up into manageable functions: function collection of statements that performs a specific task Break problem into many small parts Writing many long parts? 1 function contains all statements necessary to solve problem Many small functions can be executed in desired order: Divide/conquer Simplifies programs code reuse benefit: writing code to perform a task once/reusing as needed Defining/Calling Functions function call statement that causes function to exe: function definition contains statements that make it up When creating a function:…

Read More Read More

Fundamentals: CH 5 Notes: Loops/Files

Fundamentals: CH 5 Notes: Loops/Files

Loops/Files Increment/Decrement Operators: Increment Increase by 1: increment var: num = num +1; | num +=1; Decrement Decrease by 1: decrement var num = num -1; | num -=1; C++ provides a set of simple unary operators designed just for inc/dec vars. increment operator ++ decrement operator — Example: num++; or num–; Can be both postfix/prefix (before or after, so ++num; or num++;) Postfix mode Operator placed after var: num++; Prefix mode Operator placed before var: ++num; Increment/decrement can be…

Read More Read More

WCNA CH 7 Notes: IP Addr Autoconfiguration

WCNA CH 7 Notes: IP Addr Autoconfiguration

DHCP: Dynamic Host Config Protocol: Way for client that lack IP to request them: Static addr allocation Manages addr allocations: Centralized config Origins: BOOTP: Bootstrap Protocol: 70’s:  Diskless workstations for startup across network DHCP packets: Similar msg fmt as BOOTP: Backward compatibility to All DHCP servers on same broadcast domain receive req/send back unicast Role of Leases: addr loans for specific time: Lengths vary: Avg bet 1-3 days 4-8 hrs common on ISP networks where clients come/go all time 3…

Read More Read More

WCNA Notes: CH 6: Neighbor Discovery

WCNA Notes: CH 6: Neighbor Discovery

Neighbor Discovery: ND: Permit nodes to find out what link located on/LL prefixes/Where link’s reside/neighbors/active neighbors Associates LL addr w/ipv6 addr: Info about node comm on network Uses 5 msg types: RS: Rtr Solicitation RA: Rtr Advertisement NS: Neighbor Solicitation NA: Neighbor Advertisement Redirect Rtr Solicitation When int becomes active: Node may send RS: Asks any rtrs connected to local link to ID themselves Type: 133 Rtr Advertisement Send out msgs: More LL address/network prefix/MTU for LL/hop limit values/params Can…

Read More Read More

WCNA ICMP Notes P2: ICMPv6

WCNA ICMP Notes P2: ICMPv6

ICMPv6 Message Types Type Name Reference Doc 0 Reserved RFC 4443 1 Destination Unreachable RFC 4443 2 Packet Too Big RFC 4443 3 Time Exceeded RFC 4443 4 Parameter Problem RFC 4443 100 Private experimentation RFC 4443 101 Private experimentation RFC 4443 102–126 Unassigned   127 Reserved RFC 4443 128 Echo Request RFC 4443 129 Echo Reply RFC 4443 130 Multicast Listener Query RFC 2710 131 Multicast Listener Report RFC 2710 132 Multicast Listener Done RFC 2710 133 Router Solicitation…

Read More Read More

CH 5 Notes: WCNA ICMPv4 P1

CH 5 Notes: WCNA ICMPv4 P1

Reachability Ability to find at least 1 transmission path bet pair of hosts: So can exchange datagrams across network ICMP provides possible way to return info about routes ICMP: Ability to report errors/congestion/other conditions: Nothing but specially formatted IP diagrams: 8 byte header Subject to same conditions as other packets in general traffic Up to IP host that receives incoming ICMP msgs to act on content of those msgs Network congestion Occurs when traffic starts to exceed handling capabilities ICMP…

Read More Read More

Programming Fundamentals CH 4 if/else if/switch/case

Programming Fundamentals CH 4 if/else if/switch/case

Relational Operators: Compare numeric/char value: Determine whether 1  greater/less than/equal/not equal to other Relational Operators Meaning > Greater than < Less than >= Greater than/equal to <= Less than/equal to == Equal to != Not equal to All relational operators: Binary: Use 2 operands  x < y Relational expression: AKA Boolean expressions: Value only true/false: If x > y then y == x false == If operand on left equal to right: Both have same value: Expression true: a ==…

Read More Read More

Programming Fundamentals CH 3

Programming Fundamentals CH 3

Prompt Tells user what data he/she should enter: Should always display prompt before using cin to read input >> Stream extraction operator: Gets chars from stream object on left: Stores in var: Name on right Getting input: 2 steps: cout object to display prompt on screen cin object to read value from keyboard keyboard buffer When user types values at keyboard, those values 1st stored in buffer What if they responded this way? 5.7 4 b ENTER 5 . 7…

Read More Read More

FAT Basics: Advanced Win Forensics: CH 2 Notes

FAT Basics: Advanced Win Forensics: CH 2 Notes

FAT Basics: 1st major component: Directory entry All vers FAT: Every file/dir referenced/described in separate dir entry 32 bytes File/dirs name | size in bytes | starting extent (beginning cluster) Metadata: Created | last accessed | last-written timestamps | etc. No data content exists in dir entry Data content stored in clusters: data allocation units Tracks only starting cluster: Doesn’t track other clusters used by file Clusters 1/more sectors: Smallest unit in which a file/dir can be stored If file…

Read More Read More