Mobile Computing FINAL EXAM Due date: Dec. 23, 2018 NOTE: WRITE YOUR ANSWERS IN ENGLISH. ID#: Name: (Kor.) (Eng.) Problem #1 (10 pts). Answer the followings statements on DSR with TRUE of FALSE. 1. RREQ is a broadcast message. 2. RREP is a broadcast message. 3. RERR is a broadcast message. 4. Destination node may receive more than one RREQ messages. 5. Source node may receive more than one RREP messages for a RREQ initiated by it. 6. Source node may not receive a single RREP message. 7. The maximum number of RREP messages that a source can receive for a RREQ is the same as the number of immediate neighbors of the destination. 8. Assume S-A-B-C-D is the path found between source (S) and destination (D). When a link error occurs between B-C during delivering a packet, node B will send a RERR to S via A. 9. The first RREQ message is sent with TTL=1. This is based on the hope that the destination is one of direct neighbors of the source. 10. Route cache often degrades performance by providing stale information. Problem 2 (15 pts). Given the following network topology, node s wants to discover the route to node d using AODV routing protocol. Describe the RREQ and RREP message exchange step-by-step. The links between nodes are indicated by solid lines as in Figure 1. **Note: for better explanation, please use different figures for each step. For example, in step 1, node s broadcast RREQ to node a, with an arrow pointing out the direction of the message. Problem #3 (15 pts). Answer the following questions about MIPv6/PMIPv6 lectures: 1. What are network layer (layer-3) movement detection and link layer (layer-2) movement detection? 2. When a MN moves from one access router to another access router, handover procedure must be performed. Which of the following procedures are required for MIPv6 scheme, and which are required
for PMIPv6 scheme: link layer movement detection, network layer movement detection, IP reconfiguration, binding update/acknowledgement exchange? 3. What is the role of Home Network Prefix in PMIPv6? Is it changed while the MN moves? Problem #4 (20 pts). In SDN, when an ingress switch receives a packet for which it does not have a matching flow entry, it forwards that packet to the controller. Through some routing protocol the controller has to control the forwarding of the packet in the network. Generally, there are two types of forwarding mechanism: reactive and proactive. Give brief explanation to below questions regarding reactive and proactive forwarding. (a) Describe the difference between reactive and proactive forwarding mechanisms in SDN by discussing their mechanism. (b) For the following topology, a flow initiates at H1 and is destined at H2 and the routing/forwarding algorithm has selected the route S1 > S2 > S4 > S3 for the flow. How many control messages are generated for the first and last packets of the flow to reach to H2 when reactive forwarding is used? Answer the same for proactive forwarding as well. Problem #5 (40 pts). Using Cordova's local storage or File Plugin, make a mobile MEMO Application to keep typed-in contents after storing. The application must have User Interface as in the figure, and must contain the following functions: 1. When click the + button on the top left corner, you are able to compose a new memo 2. MEMO App displays a list of memos as in the figure below: show the preview of the memo (by displaying some text in one line, left-aligned) and the date of creating (right-aligned) 3. When you select a memo in the list, it shows the memo contents. 4. You should be able to modify the contents of the page for the memo (by clicking Modify button) 5. If you swipe to the left of the memo list, you should be able to delete it.
Hints: The following hints are made under Windows 10 environment: 1. Install Nodejs, Cordova, Java SDK (JDK- not JRE) and Android Studio as instructed in Mobile programming Lecture Week #12: Apache Cordova Framework. The installation is straightforward and can be done with no effort. 2. Configure your environment as guided in here 3. An easy way to do Problem#5 is to utilize the code in the project sharecontacts come with the lecture. a. Build and run the project with Android Studio. If you cannot build the sharecontacts project, then try to open the Android Studio with administrator privilege, and open the cmd and run the following commands: Commands - Remove the preinstalled target platforms if any: #cordova platforms remove android - Then add the new platform: #cordova platforms add android - Then try to build and emulate: #cordova build #cordova emulate android b. For seeing the effect during your development faster, just use the Android Virtual Device Manager to create a virtual device. Note that you should enable the Virtualization Technology in BIOS before you can run the virtual device. Details about creating a virtual device can be found here. Recent Android Studio hides the AVD manager menu, to access this menu, do as follows: - Open any project (or create a blank project) and press Ctrl+Shift+A - Search for "AVD Manager" to create virtual device
c. You can keep the code inside <head> </head> in the www/index.html the same, but rewrite the <body> </body> in index.html and functions in index.js to match with the tasks required for the program. d. If you use the cordova-file-plugin to save memo to a file, and later on read memo from file. Detailed instructions about cordova-file-plugin can be found here (including installation and API guidelines). You can create, write, and read file easily. If you have your file name (a string) and want to perform read/write operations to that file, you must convert the file name string to the fileentry structure which can be input into the APIs. Use window.resolvelocalfilesystemurl()for the conversion. You can name your memo files with same extension (e.g. *.memo) for later filtering the files, or create your own folder. Your memo files can be stored in cordova.file.datadirectory, or a sub-directory you create inside this directory. e. If you use local storage to store memo, together with your own search, here is one reference store data using local storage and JSON: https://thejackalofjavascript.com/storing-objects-html5- local-storage/,
Submission Guidelines Use the provided word template file to fill in your solution Make a folder named FINAL_ID_NAME including all the files you need to submit, then compress your folder to be FINAL_ID_NAME.zip and submit the compressed file via icampus. Your folder must consist of: o A.doc file containing solutions for problem #1~4, and a report of problem #5 o For problem#5, the following additional files are required: The whole executable source code of your program The executable file of the application (.apk) Configuration files and related files, if any o A report of problem#5 must explain how you implement your MEMO application. Important functions must be explained in brief with source code quote. Don t put the whole source code of your program in the report! Here is an example of the required way to quote the important function source: (the green texts are required comments) Function: fnmodifymemo() function fnmodifymemo(memo_idx){ fnstate = 'fnmove'; selectedmemoidx = memo_idx; var memo = memo_list[memo_idx]; if(memo.locked) { // if memo is locked $("#check_password").val(''); // set empty string to input $("#checkpassword").popup("open"); // show password popup } else { $("#memo_modify_nm").val(memo.content); // set memo content to input $.mobile.changepage("#memo_modify"); // go to modify page } } Grading policies: o Your solutions and program must be done in ENGLISH o Partial credit will exist, and significant credit is available to those who demonstrate a functioning program that fulfills the requirements listed. Clean code, good commenting, and intelligent/descriptive error handling combined are important components of making the project manageable- and important components of your grade. o The report of problem #5 must: Introduce your application: what is your application and its purpose, and some highlights of the application that could impress the examiner Declare your development environment (platform and compiler);, and how to COMPILE/BUILD and RUN your applications step by step Declare the folder structure of the source code and the meaning of each file inside Declare how to set up and how to use extra non-standard applications/ components you have used for your implementation, if any Describe in detail about your implementation of functionalities that are considered very important (based on your perspective)
o o o NOT to include the whole source code in the report Show two or three screenshots along with explanation for each of functionalities you have implemented Bonus: Bonus points will be awarded for extra idea and implementation for the MEMO application There will be points off for inappropriate submission style! If you are found copying each other, both will get 0 points for the copied parts. For students from KyungHee University, please submit your solution (as described above) by email, to choo.hw.skku@gmail.com and cc ntdung@skku.edu.