3 the difference between mailbox and mail directory

Info icon This preview shows pages 36–39. Sign up to view the full content.

3. The difference between mailbox and mail directory is that the former stores all mails in a file while the later stores one mail in one file and all mails (files) in one directory. Open Source Implementation 6.3: Apache Exercises
Image of page 36

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

Computer Networks: An Open Source Approach 37 1. Find which .c file and lines of code implement prefork. When is prefork invoked? 2. Find which .c file and lines of code implement cookie persistence 3. Find which .c files and lines of code implement HTTP request handling and response preparation. Answer (1 hour): 1. Implemented in Server/mpm/prefork.c(Line 1343): static void prefork_hooks(apr_pool_t *p) Invoked in Server/mpm/prefork.c (Line 1489): module AP_MODULE_DECLARE_DATA mpm_prefork_module = { MPM20_MODULE_STUFF, ap_mpm_rewrite_args, /* hook to run before apache parses args */ NULL, /* create per-directory config structure */ NULL, /* merge per-directory config structures */ NULL, /* create per-server config structure */ NULL, /* merge per-server config structures */ prefork_cmds, /* command apr_table_t */ prefork_hooks, /* register hooks */ }; 2. Modules/metadata/Mod_usertrack.c (line 208) static int spot_cookie(request_rec *r) 3. In Modules/metadata/Mod_headers.c Line 499: header_cmd(). Open Source Implementation 6.4: wu-ftpd Exercises 1. How and where are the control and data connections of an FTP session handled concurrently? Are they handled in the same process or two processes? 2. Find which .c file and lines of code implement active mode and passive mode. When is the passive mode invoked? Answer (2 hours): 1. When there is a need for data transfer, such as file transfer or list of a directory, the data connection is established. During the data transfer, both data and control connections will co-exist. The data connection is closed when the data transfer is done. A new data connection will be established when a new data transfer is requested. Both data and control connections are handled by the same process. 2. passive mode The default mode is active mode, so there is no dedicate function for active mode FTP. Implementation of active mode starts from line 567 in the main() function. The passive mode is implemented by the passive(void) function which can be
Image of page 37
Computer Networks: An Open Source Approach 38 found in /src/Ftpd.c, line 160. Open Source Implementation 6.5: Net-SNMP Exercises 1. Find which .c files and lines of code implement set operation. 2. Find out the exact structure definition of an SNMP session. Answer (2 hours): 1. The set operation is implemented by the function netsnmp_set() which could be found at line 124 in Client_intf.c. 2. /* Internal information about the state of the snmp session.*/ struct snmp_internal_session { netsnmp_request_list *requests; /* Info about outstanding requests */ netsnmp_request_list *requestsEnd; /* ptr to end of list */ int (*hook_pre) (netsnmp_session *, netsnmp_transport *, void *, int); int (*hook_parse) (netsnmp_session *, netsnmp_pdu *, u_char *, size_t); int (*hook_post) (netsnmp_session *, netsnmp_pdu *, int); int (*hook_build) (netsnmp_session *, netsnmp_pdu *, u_char *, size_t *); int (*hook_realloc_build) (netsnmp_session *, netsnmp_pdu *, u_char **, size_t *, size_t *); int (*check_packet) (u_char *, size_t);
Image of page 38

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

Image of page 39
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