INFORMATIO
Solutions_OSI_Exercises.pdf

2 find which rrs are looked up in forward query and

Info icon This preview shows pages 34–37. Sign up to view the full content.

2. Find which RRs are looked up in forward query and reverse query, respectively, on one of your local hosts. 3. Retrieve all RRs in your local name server with dig. Answer (2 hours):
Image of page 34

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

Computer Networks: An Open Source Approach 35 1. bind-9.7.0b3\bin\named\query.c Implementation can be found in query_find(), at line 3709-5099. The iterative query is processed in line 4120-4188. The following gives the operation overview: When NS receives an iterative query, it checks its local database (cache) to see if it has the answer. If yes, it returns the non-authoritative answer. If not, it returns a list of NSs in its local cache that may know the answer. The requester can send requests to these NSs for the desired answer. 2. “forward query” : As a forward query example, use the “ dig ; command to request for the IP address of the domain name “ .tw” . The ANSWER SECTION is given as follows: ;; ANSWER SECTION: . 44 IN A 140.113.235.47 “reverse query” : As a reverse query example, use “dig x 140.113.235.47 ”to query the domain name of the IP address 140.113.235.47. The ANSWER SECTION is given as follows: ;; ANSWER SECTION: 47.235.113.140.in-addr.arpa. 229179 IN PTR wwwcs.cs.nctu.edu.tw. (3) To get all domain records (if allowed by administrator): dig domain-name axfr Open Source Implementation 6.2: qmail Exercises 1. Find the .c files and the lines of code that implement qmail-smtpd, qmail-remote, and qmail-pop3d. 2. Find the exact structure definition of the qmail queue in an object of the qmail structure. 3. Find how e-mails are stored in the mailbox and mail directory. Answer (4 hours): 1. implementing qmail-smtpd: qmail-smtpd.c line 65- 69 “smtp_greet(code)” line 70- 73 “smtp_help(arg)”
Image of page 35
Computer Networks: An Open Source Approach 36 line 74- 77 “smtp_quit(arg)” line 225- 229 “smtp_helo(arg)” line 230- 234 “smtp_ehlo(arg)” line 235- 239 “smtp_rset(arg)” line 240- 249 “smtp_mail(arg)” line 250- 265 “smtp_rcpt(arg)” line 368- 395 “smtp_data(arg)” line 411- 421 “main()” implementing qmail-remote: qmail-remote.c line 89- 93 “outhost()” line 97- 104 “dropped()” line 134- 141 “get(ch)” line 166- 176 “outsmtptext()” line 178- 190 “quit(prepend,append)” line 219- 274 “smtp()” line 279- 309 “addrmangle(saout,s,flagalias,flagcname)” line 311- 327 “getcontrols()” line 329- 427 “main(argc,argv)” implementing qmail-pop3d: qmail-pop3d.c line 149- 162 “pop3_stat(arg)” line 164- 170 “pop3_rset(arg)” line 172- 178 “pop3_last(arg)” line 180- 197 “pop3_quit(arg)” line 210- 218 “pop3_dele(arg)” line 255- 274 “pop3_top(arg)” line 290- 306 “main(argc,argv)” 2. qmail queue is defined as one of the records of the data structure “ struct qmail ”; it is declared to be char buf[1024].
Image of page 36

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

Image of page 37
This is the end of the preview. Sign up to access the rest of the document.
  • Winter '15
  • MAhmoudali
  • IP address, Transmission Control Protocol

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern