I have never actually heard of an employer doing this. When you said "exam", my mind naturally went to educational programs, which would universally be wanting a display of knowlege and ability.
Without a literal rather than a paraphrased version of the problem statement, it's impossible for any of us here to infer what they are looking to get from you. The "right answer" could range from the same as the educational result, or it could be a question of how fast you can crib unencumbered code to solve a problem. Sorry, you are on your own.
-- Terry On Aug 22, 2009, at 1:56 PM, Ariel Feinerman < email@hidden> wrote: Hi Terry,
there is of the matter is that I will work as a high-level Mac programmer (Cocoa and so on) however my employer sent me this exam work, I am surprised; to the point, I do not want to "copy/paste" telnet source, I want to understand the algorithm instead;
2009/8/22 Terry Lambert <email@hidden>
On Aug 21, 2009, at 11:59 AM, Ariel Feinerman wrote:
Hi developers,
I must write simple telnetd for Mac as an exam, but I have never write network programme, I look for exist telnet in the Darwin source to look at it, but I could not find ...
Is there telnet for Darwin?
I don't think looking at someone else's telnet/telnetd sources and then cribbing from that is going to demonstrate the knowledge and problem solving skills you were intended to demonstrate, if this was actually given as an exam project.
If this is an exam, I imagine it's intended to test your abilities in: reading specifications, implementing specifications, testing for interoperability, network socket programming, input/output multiplexing, termios programming, the concept of byte-stuffing and unstuffing, pty allocation, master/slave pty operations, etc.. Depending on specific requirements for what constitutes "simple", it may also include local user authentication, session management, PAM, and other topics.
If I had assigned this as an exam, and you come back with a full blown implementation, I'd challenge you, and if you could not explain your design decisions or the operation of the code adequately to make me believe the code was yours, that would be an insta-fail. I'd also challenge it if the coding style varied widely.
Try:
<www.ietf.org/rfc/rfc854.txt>
and:
<www.omnifarious.org/~hopper/telnet-rfc.html>
for starters, instead. You might also want to look for the book:
UNIX Network Programming
PS: Since most people use ssh instead of telnet to talk to Mac OS X machines, the Mac OS X telnetd is not as strongly maintained, and has a number of flaws when it comes to interacting with host authentication mechanisms and establishing sessions and session credentials in the kernel, so it might not be the best example from that perspective, either.
-- Terry
|