1 Nap protocol specification
\r
2 ==========================
\r
4 By cyberalien@users.sourceforge.net
\r
7 Original by drscholl@users.sourceforge.net
\r
10 0. Foreward by Dr. Scholl
\r
12 This is meant to be an open specification. If you find errors or know of
\r
13 additional functionality not described hereafter, please send me email.
\r
14 It benefits the entire community to have a complete and accurate protocol
\r
15 specification. Not only does it allow for clients to be developed for any
\r
16 platform, but also decreases the strain on the server having to parse out
\r
17 bad client messages.
\r
19 0.1 Foreward by CyberAlien
\r
21 Original document is created by Dr.Scholl. I have fixed some messages,
\r
22 added OpenNap and SlavaNap messages and extentions to messages, added
\r
23 Napigator protocol specification.
\r
24 If you have any comments please mail me at mailto:cyberalien@users.sourceforge.net
\r
28 * Fixed napigator protocol (12 October 2001)
\r
29 * Fixed commands 100, 110 (12 October 2001)
\r
30 * Updated to match opennap 0.44 and slavanap 2.0.0 capabilities (14 Dec 2001)
\r
32 2. Client-Server protocol
\r
34 Nap protocol uses TCP for client to server communication. Typically the
\r
35 servers run on ports 8888 and 7777. Note that this is different from the
\r
36 `metaserver' (or redirector) which runs on port 8875.
\r
37 Note: Napster 10.3 and older use port 8876 instead of 8875.
\r
39 each message to/from the server is in the form of
\r
40 <length><type><data>
\r
41 where <length> and <type> are 2 bytes each. <length> specifies the length in
\r
42 bytes of the <data> portion of the message. Be aware that <length> and <type>
\r
43 appear to be in little-endian format (least significant byte goes first). For
\r
44 example, in the C language you would encode the number 1 as
\r
45 const unsigned char num[2] = { 0x01, 0x00 };
\r
46 and 256 would be encoded as
\r
47 const unsigned char num[2] = { 0x00, 0x01 };
\r
48 [The above is for illustrative purposes only, there are much quicker ways to
\r
49 actually encode a number. -ed]
\r
50 The <data> portion of the message is a plain ASCII string.
\r
52 Napster Beta 10.3+ use big-endian format instead of little-endian.
\r
53 This means that 256 would be encoded as { 0x01, 0x00 }
\r
54 and 1 as { 0x00, 0x01 };
\r
56 Note that in many cases, strings are passed as double-quoted entries. For
\r
57 example, filenames and client id strings are always sent as
\r
58 "random band - generic cowboy song.mp3"
\r
61 Where required, double quotes are used in the description of the messages
\r
64 Some additional information about use of quotes inside of quotes:
\r
65 > The answer is, no, it doesn't do escaping of quotes. If you try searching
\r
66 > for the phrase 'a "quoted" string' on the windows client, you get no songs
\r
67 > found, and "invalid search request" printed in yellow in your console
\r
68 > window. (don't know what code that is, sorry.)
\r
70 > and no wonder-- a little birdie told me that the client sends this:
\r
72 > FILENAME CONTAINS "a "quoted" string" MAX_RESULTS 100
\r
74 [contributed by Ben Byer <bbyer@rice.edu>. -ed]
\r
76 Note that unlike the IRC protocol, each line does NOT end in \r\n. The
\r
77 <length> field specifies exactly how much data you should read.
\r
81 The following section describes the format of the <data> section for each
\r
82 specific message type. Each field is denoted with <>. The fields in a
\r
83 message are separated by a single space character (ASCII 32). Where
\r
84 appropriate, examples of the <data> section for each message are given.
\r
86 [SERVER] means that message is sent by server
\r
87 [CLIENT] means that message is send by client
\r
88 [NAPSTER] means that Napster client or server uses this message
\r
89 [OPENNAP] means that this message is supported by OpenNap 0.44
\r
90 [SLAVANAP] means that this message is supported by SlavaNap 2.0.0
\r
92 Detecting server type is easy. When user logs in server sends MOTD
\r
93 and OpenNap and SlavaNap sends string "VERSION opennap 0.44" or
\r
94 "VERSION SlavaNap 2.0.0" among other MOTD strings.
\r
96 <type> can be one of the following (converted to big-endian):
\r
98 0 error message [SERVER]
\r
100 [NAPSTER,OPENNAP,SLAVANAP]
\r
106 [NAPSTER,OPENNAP,SLAVANAP]
\r
108 Format: <nick> <password> <port> "<client-info>" <link-type> [ <num> ]
\r
110 <port> is the port the client is listening on for data transfer. if
\r
111 this value is 0, it means that the client is behind a firewall
\r
112 and can only push files outward. it is expected that requests
\r
113 for downloads be made using the 500 message (see below)
\r
114 <client-info> is a string containing the client version info
\r
115 <link-type> is an integer indicating the client's bandwidth
\r
127 <num> build number for the windows client [optional]
\r
131 foo badpass 6699 "nap v0.8" 3
\r
133 3 login ack [SERVER]
\r
135 [NAPSTER,OPENNAP,SLAVANAP]
\r
137 Format: <email> [<number>]
\r
139 the server sends this message to the client after a succesful
\r
140 login (2). If the nick is registered, the <email> address given at
\r
141 registration time is returned. If the nick is not registered, a
\r
142 dummy value is returned.
\r
144 <number> is added by Napster server.
\r
145 This is probably user's number.
\r
147 4 version check [CLIENT] [SERVER]
\r
149 [NAPSTER,OPENNAP,SLAVANAP]
\r
153 Server sends [5] if an update is needed and [4] if not.
\r
155 <version> = string, version 2.0b5a sends "2.0"
\r
157 5 "auto-upgrade" [SERVER]
\r
162 Beta5 Format: <version> <hostname:filename>
\r
164 Napster is out of date, get a new version.
\r
165 Used to be gaping security hole in Beta5.
\r
167 <version> = string, the new version number.
\r
168 <hostname> = string, hostname of upgrade (http) server
\r
169 <filename> = string, filename
\r
171 <hostname> and <filename> are used only by Beta5
\r
172 Later versions ignore these values.
\r
174 6 new user login [CLIENT]
\r
176 [NAPSTER,OPENNAP,SLAVANAP]
\r
178 Format: <nick> <pass> <port> "<client-info>" <speed> <email-address>
\r
180 This message is used when logging in for the first time to register
\r
181 a new nickname. The client normally checks for an unused nick using
\r
182 the "check nickname" (7) message and upon receipt of a "nickname not
\r
183 registered" (8) from the server will proceceed to log in with this
\r
186 note: this message is similar to the 0x02 message, with the addition
\r
187 of <email-address> on the end
\r
191 foo foo 6699 "nap v0.8" 3 email@here.com
\r
193 7 nick check [CLIENT]
\r
195 [NAPSTER,OPENNAP,SLAVANAP]
\r
199 Queries the server to see if <nick> is already registered. This
\r
200 message is typically used prior to logging in for the first time to
\r
201 check for a valid nickname.
\r
203 Response to this message is one of 8, 9 or 10
\r
205 8 nickname not registered [SERVER]
\r
207 [NAPSTER,OPENNAP,SLAVANAP]
\r
211 The server sends this message in response to the "nick check" (7)
\r
212 message to indicate that the specified nickname is not already
\r
213 registered and is ok to use.
\r
215 9 nickname already registered [SERVER]
\r
217 [NAPSTER,OPENNAP,SLAVANAP]
\r
221 The server sends this message when the nickname the client has
\r
222 requested has already been registered by another user
\r
224 10 (0x0a) invalid nickname [SERVER]
\r
226 [NAPSTER,OPENNAP,SLAVANAP]
\r
230 This server sends this message in response to the "check nickname"
\r
231 (7) messages when the specified nickname is invalid, usually due to
\r
232 bad characters such as spaces or other non-printable characters.
\r
234 The Napster, Inc. servers only accept (upper- and lower-case) nicks
\r
235 comprised of the following:
\r
236 abcdefghijklmnopqrstuvwxyz1234567890_[]{}-@^!$
\r
238 11 password check [CLIENT]
\r
242 Format: <nick> <pass>
\r
244 This command is used by Napster only during setup sequence.
\r
245 If password is correct server replies with message 12. If not
\r
246 server sends message 0.
\r
248 12 password OK [SERVER]
\r
254 this message is returned in response to message 11 from the client
\r
256 13 echo??? [SERVER]
\r
260 Format: <numeric>: [args]
\r
262 Prior to issuing a login (2) command, the server will echo back the
\r
263 received numeric and any arguments of any commands it receives.
\r
265 14 login options [CLIENT]
\r
269 NAME:%s ADDRESS:%s CITY:%s STATE:%s PHONE:%s AGE:%s INCOME:%s EDUCATION:%s
\r
273 NAME: kev ADDRESS: CITY: ephrata STATE: pa PHONE: AGE: 60 or older INCOME: $100,000 or more EDUCATION: Graduate Degree
\r
275 No reply is required.
\r
277 15 Same as 14. Used by Beta7+ (I don't know if previous versions used command 15 or not)
\r
281 100 (0x64) client notification of shared file [CLIENT]
\r
283 [NAPSTER,OPENNAP,SLAVANAP]
\r
285 Format: "<filename>" <md5> <size> <bitrate> <frequency> <time>
\r
287 <md5> see section "MD5"
\r
295 "generic band - generic song.mp3" b92870e0d41bc8e698cf2f0a1ddfeac7-443008 443332 128 44100 60
\r
297 For sharing non-mp3 files there is a command 10300 that is supported
\r
298 by OpenNap and SlavaNap, but most clients use command 100 (or 870)
\r
299 and just set bitrate=24 freq=16000 time=600.
\r
301 102 (0x66) remove file [CLIENT]
\r
303 [NAPSTER,OPENNAP,SLAVANAP]
\r
307 client requests to remove file from shared library
\r
309 110 unshare all files [CLIENT, SERVER]
\r
311 [NAPSTER,OPENNAP,SLAVANAP]
\r
316 Notifies the server that the client is no longer sharing any of the
\r
317 files previously shared. Server replies with 110 containing number
\r
318 of files that client shared before.
\r
320 200 (0xc8) client search request [CLIENT]
\r
322 [NAPSTER,OPENNAP,SLAVANAP]
\r
326 [FILENAME CONTAINS "artist name"] MAX_RESULTS <max> [FILENAME CONTAINS
\r
327 "song"] [LINESPEED <compare> <link-type>] [BITRATE <compare> "<br>"] [FREQ
\r
328 <compare> "<freq>"] [WMA-FILE] [LOCAL_ONLY]
\r
330 For OpenNap and SlavaNap only:
\r
332 [TYPE <mime-type>] [FILENAME EXCLUDES "exclude string"] [SIZE <compare>
\r
333 <filesize_in_bytes>] [DURATION <compare> <song_duration_in_seconds>]
\r
335 For SlavaNap 2.x only:
\r
337 [SHOW_QUEUE] [SHOW_SOFTWARE]
\r
341 The artist name and the song name are strings filename should include.
\r
342 There is no difference between artist name and song name.
\r
344 <max> is a number; if it is greater than 100, Napster server will only return
\r
345 100 results. With OpenNap and SlavaNap <max> can be greater than 100.
\r
347 <compare> is one of the following:
\r
348 "AT LEAST" "AT BEST" "EQUAL TO"
\r
350 <link-type> integer ranging from 1 to 10. see 0x02 (client login) for a description.
\r
352 <br> is a number, in kbps
\r
354 <freq> is a sample frequency, in Hz
\r
356 <mime-type> OpenNap and SlavaNap support other media types besides mp3.
\r
357 By default, searches will only match mp3 files. A client can
\r
358 however search for other media types by specifying a partial
\r
359 MIME content-type (audio, video, text, application, image, mp3).
\r
360 (See message 10300 for adding media to the database).
\r
361 The special keyword `any' will match any media type in the
\r
364 The results of the search are returned as with mp3, except
\r
365 the fields for bitrate, sample frequency and length are
\r
366 meaningless. The client can then download as they would any
\r
369 FILENAME EXCLUDES "..."
\r
371 allows filtering search results by excluded all files which
\r
372 match words in an exclude list. this must be used in
\r
373 conjunction with FILENAME CONTAINS "...".
\r
374 (NOTE: as of Napster 2.0 BETA 8, words in the
\r
375 FILENAME CONTAINS string which are prefixed with a minus
\r
376 sign (-) are considered to be exclusive.)
\r
377 Can be used only with OpenNap and SlavaNap servers.
\r
381 allows matching on the file size and song length in addition
\r
382 to the other file attributes. Can be used only with OpenNap
\r
383 and SlavaNap servers.
\r
385 LOCAL_ONLY causes the server to only search for files from users on
\r
386 the same server rather than all linked servers.
\r
388 SHOW_QUEUE this works only with SlavaNap 2.x servers. if causes server
\r
389 to add number of queued items for remote user to each search result.
\r
390 if remote user's software doesn't show queue server will add "n/a"
\r
391 instead of queue. otherwise server will return number counted
\r
392 with the following simple algorythm:
\r
393 current_uploads + queued_uploads - max_uploads;
\r
394 so, if you can download from remote user without entering queue
\r
395 server will return any negative number, if user has maximum
\r
396 uploads right now server will return number of queued items.
\r
397 To set number of queued items use SlavaNap's command 8112. You
\r
398 can also retreive number of queued items using SlavaNap's command
\r
399 8113 instead of adding "SHOW_QUEUE" to search request.
\r
400 See also "readme.txt" in SlavaNap.
\r
402 SHOW_SOFTWARE this works only with SlavaNap 2.x servers. if causes server
\r
403 to add client's software signature to search result. This might
\r
404 be used if your client has its own special protocol and you
\r
405 don't want to disturb other clients with messages that other
\r
406 client wouldn't understand.
\r
407 If you use both "SHOW_QUEUE" and "SHOW_SOFTWARE" in search
\r
408 request, server will add queue first and software second to
\r
410 See also "readme.txt" in SlavaNap.
\r
413 The windows client filters by ping time inside the client.
\r
414 It pretty much has to, and it's easy to see the
\r
415 result by setting ping time to at best 100 ms or
\r
416 so, and max search terms to 50. You'll get back
\r
417 like 3 results, but the client will still tell you
\r
418 that it found "50 results".
\r
421 FILENAME CONTAINS "Sneaker Pimps" MAX_RESULTS 75 FILENAME
\r
422 CONTAINS "tesko suicide" BITRATE "AT LEAST" "128"
\r
424 MAX_RESULTS 100 FILENAME CONTAINS "Ventolin" LINESPEED
\r
427 [Thanks to Ben Byer <bbyer@rice.edu> for this contribution. -ed]
\r
430 SEE ALSO: 10300 share non-mp3 file.
\r
432 201 (0xc9) search response [SERVER]
\r
434 [NAPSTER,OPENNAP,SLAVANAP]
\r
436 "<filename>" <md5> <size> <bitrate> <frequency> <length> <nick> <ip>
\r
437 <link-type> [ [weight] | [queue] "[software]" ]
\r
439 <md5> see secton "MD5"
\r
440 <size> is file size in bytes
\r
441 <bitrate> is mp3 bit rate in kbps
\r
442 <frequency> is sample rate in hz
\r
443 <length> is the play length of the mp3 in seconds
\r
444 <nick> the person sharing the file
\r
445 <ip> is an unsigned long integer representing the ip address of the
\r
446 user with this file
\r
447 <link-type> see message client login (2) message for a description
\r
448 [weight] a weighting factor to allow the client to sort the
\r
449 list of results. positive values indicate a "better"
\r
450 match, negative values indicate a "worse" match.
\r
451 If not present, the weight should be considered to be
\r
453 [queue] for SlavaNap 2.x only. queued items number for remote
\r
454 user. server will return it if you have added
\r
455 "SHOW_QUEUE" to search request. parameter [weight]
\r
456 is not returned by slavanap server.
\r
458 [software] for SlavaNap 2.x only. this parameter shows software
\r
459 that is used by remote client. parameter [weight]
\r
460 is not returned by slavanap server.
\r
464 "random band - random song.mp3" 7d733c1e7419674744768db71bff8bcd-2557521 2558199 128 44100 159 lefty 3437166285 4
\r
468 request: FILENAME CONTAINS "sunshine"
\r
469 possible reply: "c:\MP3\Emma Bunton - Sunshine On A Rainy Day.mp3" 00000000000000000000000000000000 4118494 128 44100 257 CyberAlien 3437166285 6
\r
471 request: FILENAME CONTAINS "sunshine" SHOW_QUEUE
\r
472 possible reply: "c:\MP3\Emma Bunton - Sunshine On A Rainy Day.mp3" 00000000000000000000000000000000 4118494 128 44100 257 CyberAlien 3437166285 6 n/a
\r
473 possible reply: "c:\MP3\Emma Bunton - Sunshine On A Rainy Day.mp3" 00000000000000000000000000000000 4118494 128 44100 257 CyberAlien 3437166285 6 2
\r
474 possible reply: "c:\MP3\Emma Bunton - Sunshine On A Rainy Day.mp3" 00000000000000000000000000000000 4118494 128 44100 257 CyberAlien 3437166285 6 -1
\r
476 request: FILENAME CONTAINS "sunshine" SHOW_SOFTWARE
\r
477 possible reply: "c:\MP3\Emma Bunton - Sunshine On A Rainy Day.mp3" 00000000000000000000000000000000 4118494 128 44100 257 CyberAlien 3437166285 6 "v2.0 BETA 10.4"
\r
478 possible reply: "c:\MP3\Emma Bunton - Sunshine On A Rainy Day.mp3" 00000000000000000000000000000000 4118494 128 44100 257 CyberAlien 3437166285 6 CQ_EX
\r
480 request: FILENAME CONTAINS "sunshine" SHOW_SOFTWARE SHOW_QUEUE
\r
481 possible reply: "c:\MP3\Emma Bunton - Sunshine On A Rainy Day.mp3" 00000000000000000000000000000000 4118494 128 44100 257 CyberAlien 3437166285 6 n/a "v2.0 BETA 10.4"
\r
482 possible reply: "c:\MP3\Emma Bunton - Sunshine On A Rainy Day.mp3" 00000000000000000000000000000000 4118494 128 44100 257 CyberAlien 3437166285 6 0 CQ_EX
\r
484 202 (0xca) end of search response from server [SERVER]
\r
486 [NAPSTER,OPENNAP,SLAVANAP]
\r
490 203 (0xcb) download request [CLIENT]
\r
492 [NAPSTER,OPENNAP,SLAVANAP]
\r
494 Format: <nick> "<filename>"
\r
496 client requests to download <filename> from <nick>. client expects
\r
497 to make an outgoing connection to <nick> on their specified data
\r
502 mred "C:\Program Files\Napster\generic cowboy song.mp3"
\r
504 SEE ALSO: 500 alternate download request
\r
506 204 (0xcc) download ack [SERVER]
\r
508 [NAPSTER,OPENNAP,SLAVANAP]
\r
510 <nick> <ip> <port> "<filename>" <md5> <linespeed>
\r
512 server sends this message in response to a 203 request.
\r
514 <nick> is the user who has the file
\r
515 <ip> is an unsigned long integer representing the ip address
\r
516 <port> is the port <nick> is listening on
\r
517 <filename> is the file to retrieve
\r
518 <md5> is the md5 sum
\r
519 <linespeed> is the user's connection speed (see login(2))
\r
523 lefty 4877911892 6699 "generic band - generic song.mp3" 10fe9e623b1962da85eea61df7ac1f69 3
\r
525 205 (0xcd) private message to/from another user [CLIENT, SERVER]
\r
527 [NAPSTER,OPENNAP,SLAVANAP]
\r
531 note the same type is used for a client sending a msg or recieving one
\r
533 206 (0xce) get error [SERVER]
\r
535 [NAPSTER,OPENNAP,SLAVANAP]
\r
537 <nick> "<filename>"
\r
539 the server sends this message when the file that the user has
\r
540 requested to download is unavailable (such as the user is not logged
\r
543 207 (0xcf) add hotlist entry [CLIENT]
\r
545 [NAPSTER,OPENNAP,SLAVANAP]
\r
549 This message is used to add additional entries to the client's
\r
550 hotlist. The server will send 209 and 210 messages when a user
\r
551 on the hotlist has logged in or out, respectively.
\r
553 208 (0xd0) hotlist [CLIENT]
\r
555 [NAPSTER,OPENNAP,SLAVANAP]
\r
559 This message is used to send the initial list of hotlist entries
\r
560 during the initial login process. It is normally send prior to
\r
561 to the add file (100) commands. To add more entries to the hotlist
\r
562 after the initial list is sent, clients should use the 207 message
\r
565 209 (0xd1) user signon [SERVER]
\r
567 [NAPSTER,OPENNAP,SLAVANAP]
\r
571 server is notifying client that a user in their hotlist, <user>,
\r
572 has signed on the server with link <speed>
\r
574 210 (0xd2) user signoff [SERVER]
\r
576 [NAPSTER,OPENNAP,SLAVANAP]
\r
580 server is notifying client that a user on their hotlist, <user>, has
\r
581 signed off the server.
\r
583 this message is also sent by the server when the client attempts to
\r
584 browse a nonexistent client.
\r
586 211 (0xd3) browse a user's files [CLIENT]
\r
588 [NAPSTER,OPENNAP,SLAVANAP]
\r
592 the client sends this message when it wants to get a list of the files
\r
593 shared by a specific client
\r
595 212 (0xd4) browse response [SERVER]
\r
597 [NAPSTER,OPENNAP,SLAVANAP]
\r
599 <nick> "<filename>" <md5> <size> <bitrate> <frequency> <time>
\r
601 <nick> is the user contributing the file
\r
602 <filename> is the mp3 file contributed
\r
603 <md5> is the has of the mp3 file
\r
604 <size> is the file size in bytes
\r
605 <bitrate> is the mp3 bitrate in kbps
\r
606 <frequence> is the sampling frequency in Hz
\r
607 <time> is the play time in seconds
\r
611 foouser "generic band - generic song.mp3" b92870e0d41bc8e698cf2f0a1ddfeac7 443332 128 44100 60
\r
613 213 (0xd5) end of browse list [SERVER]
\r
615 [NAPSTER,OPENNAP,SLAVANAP]
\r
619 indicates no more entries in the browse list for <user>. <ip> gives
\r
620 the client's IP address.
\r
622 214 (0xd6) server stats [CLIENT, SERVER]
\r
624 [NAPSTER,OPENNAP,SLAVANAP]
\r
627 server: <users> <# files> <size> ["GB" <myfiles>]
\r
629 <size> is approximate total library size in gigabytes
\r
630 this message is sent by the server occasionaly without request
\r
631 "GB" text is added by Napster server since version 10.3
\r
632 <myfiles> is number of files shared by user.
\r
637 new: 553 64692 254 GB 102
\r
639 215 (0xd7) request resume [CLIENT]
\r
641 [NAPSTER,OPENNAP,SLAVANAP]
\r
643 <checksum> <filesize>
\r
645 client is requesting a list of all users which have the file with
\r
646 the characteristics. the server responds with a list of 216 messages
\r
647 for each match, followed by a 217 message to terminate the list
\r
649 216 (0xd8) resume search response [SERVER]
\r
651 [NAPSTER,OPENNAP,SLAVANAP]
\r
653 <user> <ip> <port> <filename> <checksum> <size> <speed>
\r
655 this message contains the matches for the resume request (215). the
\r
656 list is terminated by a 217 message.
\r
658 217 (0xd9) end of resume search list [SERVER]
\r
660 [NAPSTER,OPENNAP,SLAVANAP]
\r
664 this messag terminates a list of 216 messages initiated by a 215
\r
667 218 (0xda) downloading file [CLIENT]
\r
669 [NAPSTER,OPENNAP,SLAVANAP]
\r
673 client sends this message to the server to indicate they are in the
\r
674 process of downloading a file. this adds 1 to the download count
\r
675 which the server maintains.
\r
677 219 (0xdb) download complete [CLIENT]
\r
679 [NAPSTER,OPENNAP,SLAVANAP]
\r
683 client sends this message to the server to indicate they have
\r
684 completed the file for which a prior 218 message was sent. this
\r
685 subtracts one from the download count the server maintains
\r
687 220 (0xdc) uploading file [CLIENT]
\r
689 [NAPSTER,OPENNAP,SLAVANAP]
\r
693 client sends this message to indicate they are uploading a file.
\r
694 this adds one to the upload count maintained by the server.
\r
696 221 (0xdd) upload complete [CLIENT]
\r
698 [NAPSTER,OPENNAP,SLAVANAP]
\r
702 client sends this message when they are finished uploading a file.
\r
703 this subtracts one from the upload count maintained by the server.
\r
705 300 (0x12c) optional ports [CLIENT]
\r
711 This command allows the client to specify optional ports to try for
\r
712 data connections if the one currently in use is unreachable by other
\r
713 parties. Ignored by OpenNap and SlavaNap.
\r
715 301 (0x12d) hotlist ack [SERVER]
\r
717 [NAPSTER,OPENNAP,SLAVANAP]
\r
721 server is notifying client that <user> has successfully be added to
\r
724 302 (0x12e) hotlist error [SERVER]
\r
726 [NAPSTER,OPENNAP,SLAVANAP]
\r
730 server is notifying client that it was unable to add <user> to their
\r
731 hotlist. [can you only add registered nicks to your hotlist? -ed]
\r
733 303 (0x12f) remove user from hotlist [CLIENT]
\r
735 [NAPSTER,OPENNAP,SLAVANAP]
\r
739 client is notifying the server that it no longer wishes to request
\r
740 notifications about <user> when they sign on or off the server. no
\r
741 response is sent in return.
\r
743 310 ??? [CLIENT, SERVER]
\r
750 unknown command. server returns 0 regardless of any parameters
\r
752 316 client disconnect??? [CLIENT, SERVER]
\r
759 The server sends this message with a value of `0' when the client is
\r
760 about to be disconnected.
\r
762 It is unkonwn what this command does when issued by the client. The
\r
763 server appears to send the 316 message without disconnected the client
\r
766 [the server seems to send this message if you send it a numeric
\r
767 greater than 1000. the server will also disconnect you after
\r
768 sending this message. -ed]
\r
770 320 (0x140) user ignore list [CLIENT, SERVER]
\r
772 [NAPSTER,OPENNAP,SLAVANAP]
\r
777 client request to display the list of ignored users.
\r
778 server returns the number of users being ignored
\r
780 321 (0x141) user ignore list entry [SERVER]
\r
782 [NAPSTER,OPENNAP,SLAVANAP]
\r
786 server sends each ignored nick in response to a 320 request. the
\r
787 list is terminated by a 320 message with the number of ignored users.
\r
789 322 (0x142) add user to ignore list [CLIENT, SERVER]
\r
791 [NAPSTER,OPENNAP,SLAVANAP]
\r
795 server acks the request by returning the nick
\r
797 323 (0x143) remove user from ignore list [CLIENT, SERVER]
\r
799 [NAPSTER,OPENNAP,SLAVANAP]
\r
803 server acks the request by returning the nick to be removed from
\r
806 324 (0x144) user is not ignored [SERVER]
\r
808 [NAPSTER,OPENNAP,SLAVANAP]
\r
812 server indicates that <user> is not currently ignored in response to
\r
815 325 (0x145) user is already ignored [SERVER]
\r
817 [NAPSTER,OPENNAP,SLAVANAP]
\r
821 server indicates the specified user is already on the user's ignore
\r
824 326 (0x146) clear ignore list [CLIENT, SERVER]
\r
826 [NAPSTER,OPENNAP,SLAVANAP]
\r
831 client requests the server clear its ignore list. server returns the
\r
832 number of entries removed from the ignore list.
\r
834 330 (0x14a) blocked ip list [CLIENT]
\r
837 332 (0x14c) block ip [CLIENT]
\r
840 333 (0x14d) unblock ip [CLIENT]
\r
843 400 (0x190) join channel [CLIENT]
\r
845 [NAPSTER,OPENNAP,SLAVANAP]
\r
849 the client sends this command to join a channel
\r
851 401 (0x191) part channel [CLIENT, SERVER]
\r
853 [NAPSTER,OPENNAP,SLAVANAP]
\r
857 The client sends this command to part a channel. Server sends this
\r
858 message to indicate that the client has parted the channel. Note
\r
859 that this is sometimes sent even when the client has not requested,
\r
860 so a client _must_ be prepared to accept it at any time.
\r
862 402 (0x192) send public message [CLIENT]
\r
864 [NAPSTER,OPENNAP,SLAVANAP]
\r
866 <channel> <message>
\r
868 403 (0x193) public message [SERVER]
\r
870 [NAPSTER,OPENNAP,SLAVANAP]
\r
872 <channel> <nick> <text>
\r
874 this message is sent by the server when a client sends a public message
\r
879 80's espinozaf hello...hola
\r
881 404 (0x194) error message [SERVER]
\r
883 [NAPSTER,OPENNAP,SLAVANAP]
\r
887 This message is used to send general error messages to a client that
\r
888 is logged in. Note: Message 0 is only sent during the login process.
\r
892 User nosuchuser is not currently online.
\r
893 Channel #nosuchchannel does not exist!
\r
895 ping failed, blah is not online
\r
897 405 (0x195) join acknowledge [SERVER]
\r
899 [NAPSTER,OPENNAP,SLAVANAP]
\r
903 the server sends this message to the client to acknowlege that it
\r
904 has joined the requested channel (400)
\r
905 Note: <channel> in this message can be different from one sent in 400
\r
906 and client must be ready to join another channel instead of requested.
\r
908 406 (0x196) join message [SERVER]
\r
910 [NAPSTER,OPENNAP,SLAVANAP]
\r
912 <channel> <user> <sharing> <link-type>
\r
914 <user> has joined <channel>
\r
918 80's WilmaFlinstone 12 2
\r
920 407 (0x197) user parted channel [SERVER]
\r
922 [NAPSTER,OPENNAP,SLAVANAP]
\r
924 <channel> <nick> <sharing> <linespeed>
\r
930 408 (0x198) channel user list entry [SERVER]
\r
932 [NAPSTER,OPENNAP,SLAVANAP]
\r
934 <channel> <user> <sharing> <link-type>
\r
936 this message is identical to the join (406) message. the server will
\r
937 send the list of users in the channel prior to the client join command
\r
938 in this message. joins that occur after the client has joined will
\r
939 be noted by a 406 message.
\r
941 409 (0x199) end of channel user list [SERVER]
\r
943 [NAPSTER,OPENNAP,SLAVANAP]
\r
947 this message is sent by the server to indicate it has sent all information
\r
948 about the users in a channel
\r
950 410 (0x19a) channel topic [CLIENT, SERVER]
\r
952 [NAPSTER,OPENNAP,SLAVANAP]
\r
956 sent when joining a channel or a new topic is set. a client requesting
\r
957 topic change also uses this message.
\r
959 [why didn't they put a field to indicate WHO changed the topic? as
\r
960 it is now you can only tell that it was changed. -ed]
\r
962 420 (0x1a4) channel ban list [CLIENT, SERVER]
\r
964 [NAPSTER,OPENNAP,SLAVANAP]
\r
968 This command is used by clients to request the list of channel bans,
\r
969 and by the server to indicate the end of the channel ban list for
\r
970 a channel (also see 421).
\r
972 421 (0x1a5) channel ban list entry [SERVER]
\r
974 [NAPSTER,OPENNAP,SLAVANAP]
\r
976 422 (0x1a6) channel ban [CLIENT]
\r
978 [NAPSTER,OPENNAP,SLAVANAP]
\r
980 <channel> <user|ip> [ "<reason>" ]
\r
982 423 (0x1a7) channel unban [CLIENT]
\r
984 [NAPSTER,OPENNAP,SLAVANAP]
\r
986 <channel> <user|ip> [ "<reason>" ]
\r
988 424 (0x1a8) channel ban clear [CLIENT]
\r
990 [NAPSTER,OPENNAP,SLAVANAP]
\r
994 425 channel motd (alternate topic (?)) [SERVER]
\r
1000 [The server sends this command when a user joins one of the
\r
1001 predefined channels. It seems to send a default message if the
\r
1002 topic for the channel is the default, otherwise it sends the current
\r
1003 channel topic. -ed]
\r
1005 430 invite a user [CLIENT, SERVER]
\r
1007 [NAPSTER,SLAVANAP]
\r
1009 Client: <nick> <channel>
\r
1010 Server: <nick> <channel> "<topic>" <unknown> <unknown>
\r
1012 This command is used by Napster 2.0 BETA 9.6+ to invite a user to
\r
1013 a channel. The funniest thing about this command is that it is
\r
1014 supported by Napster clients but not supported by Napster servers ;)
\r
1015 Napster implementation of this command is a little bit buggy.
\r
1018 <nick> - nick of invited user
\r
1019 <channel> - channel user <nick> was invited to
\r
1021 <nick> - nick of user who was inviting
\r
1022 <channel> - channel
\r
1023 <topic> - channel's topic
\r
1024 <unknown> - ??? ("0" works fine)
\r
1026 When user receives 430 message user should reply with 431 or 432
\r
1027 and, if invitation accepted, user should join channel with 400.
\r
1031 CyberAlien2 #test_channel
\r
1035 CyberAlien3 #test_channel "Welcome to the #test_channel." 0 0
\r
1037 431 invitation accepted [CLIENT]
\r
1039 [NAPSTER,SLAVANAP]
\r
1041 Format: <user> <channel>
\r
1043 <user> - user who was inviting
\r
1045 432 invitation declined [CLIENT]
\r
1047 [NAPSTER,SLAVANAP]
\r
1049 Format: copy of command received in 430 message works fine.
\r
1051 500 (0x1f4) alternate download request [CLIENT]
\r
1053 [NAPSTER,OPENNAP,SLAVANAP]
\r
1055 <nick> "<filename>"
\r
1057 requests that <nick> make an outgoing connection to the requesters
\r
1058 client and send <filename>. this message is for use when the
\r
1059 person sharing the file can only make an outgoing tcp connection
\r
1060 because of firewalls blocking incoming messages. this message should
\r
1061 be used to request files from users who have specified their data
\r
1062 port as 0 in their login message
\r
1064 501 (0x1f5) alternate download ack [SERVER]
\r
1066 [NAPSTER,OPENNAP,SLAVANAP]
\r
1068 <nick> <ip> <port> "<filename>" <md5> <speed>
\r
1070 this message is sent to the uploader when their data port is set to
\r
1071 0 to indicate they are behind a firewall and need to push all data
\r
1072 outware. the uploader is responsible for connecting to the
\r
1073 downloader to transfer the file.
\r
1075 600 (0x258) request user's link speed [CLIENT]
\r
1077 [NAPSTER,OPENNAP,SLAVANAP]
\r
1081 601 (0x259) link speed response [SERVER]
\r
1083 [NAPSTER,OPENNAP,SLAVANAP]
\r
1085 <nick> <linespeed>
\r
1087 602 (0x25a) ??? [CLIENT]
\r
1093 server returns a 404 with "*gulp* Drink milk, it does a body good!"
\r
1095 603 (0x25b) whois request [CLIENT]
\r
1097 [NAPSTER,OPENNAP,SLAVANAP]
\r
1101 604 (0x25c) whois response [SERVER]
\r
1103 [NAPSTER,OPENNAP,SLAVANAP]
\r
1105 <nick> "<user-level>" <time> "<channels>" "<status>" <shared>
\r
1106 <downloads> <uploads> <link-type> "<client-info>" [ <total downloads>
\r
1107 <total_uploads> <ip> <connecting port> <data port> <email> [<server>]]
\r
1109 <user-level> is one of "User", "Moderator", "Admin" or "Elite"
\r
1110 <time> is seconds this user has been connected
\r
1111 <channels> is the list of channels the client is a member of, each
\r
1112 separated by a space (ASCII 32)
\r
1113 <status> is one of "Active", "Inactive" (offline) or "Remote" (on a
\r
1115 <shared> is number of files user has available for download
\r
1116 <downloads> is the current number of downloads in progress
\r
1117 <uploads> is the current number of uploads in progress
\r
1118 <link-type> see 0x02 (client login) above
\r
1119 <client-info> see 0x02 (client login) above
\r
1121 The following fields are displayed for user level moderator and
\r
1126 <ip> note: can be "unavailable"
\r
1129 <email> note: can be unavailable
\r
1130 <server> used only by SlavaNap and opennap servers. It shows
\r
1131 which server client is connected to.
\r
1135 lefty "User" 1203 "80's " "Active" 0 0 0 3 "nap v0.8"
\r
1137 605 (0x25d) whowas response [SERVER]
\r
1139 [NAPSTER,OPENNAP,SLAVANAP]
\r
1141 <user> <level> <last-seen>
\r
1143 if the user listed in a 603 request is not currently online, the
\r
1144 server sends this message.
\r
1146 <user> is the user for which information was requested
\r
1147 <level> is the user's last known userlevel (user/mod/admin)
\r
1148 <last-seen> is the last time at which this user was seen, measured
\r
1149 as seconds since 12:00am on January 1, 1970 (UNIX time_t).
\r
1151 606 (0x25e) change user level [CLIENT]
\r
1153 [NAPSTER,OPENNAP,SLAVANAP]
\r
1157 changes the privileges for <nick> to <level>. client must be admin
\r
1158 level to execute this request
\r
1160 [I have not verified this message since I don't have admin status
\r
1161 on any of Napster servers. -ed]
\r
1163 607 (0x25f) upload request [SERVER]
\r
1165 [NAPSTER,OPENNAP,SLAVANAP]
\r
1167 <nick> "<filename>" <speed>
\r
1169 this message is used to notify the client that user <nick> has
\r
1170 requested upload of <filename>
\r
1174 lefty "generic band - generic song.mp3" 7
\r
1176 608 (0x260) accept upload request [CLIENT]
\r
1178 [NAPSTER,OPENNAP,SLAVANAP]
\r
1180 <nick> "<filename>"
\r
1182 client is notifying server that upload of <filename> to <nick> is
\r
1183 accepted, and that the requesting client may begin download
\r
1187 lefty "generic band - generic song.mp3"
\r
1189 609 (0x261) accept failed [CLIENT, SERVER]
\r
1191 [NAPSTER,OPENNAP,SLAVANAP]
\r
1193 <nick> "<filename>"
\r
1195 This message is sent by the server when the client that the file was
\r
1196 requested from does not accept the upload request.
\r
1198 This message also used by AudioGnome to notify other user that upload
\r
1199 or download was canceled.
\r
1201 610 (0x262) kill (disconnect) a user [CLIENT]
\r
1203 [NAPSTER,OPENNAP,SLAVANAP]
\r
1205 <nick> [ "<reason>" ]
\r
1207 client request to disconnect a user.
\r
1209 611 (0x263) nuke a user [CLIENT]
\r
1211 [NAPSTER,OPENNAP,SLAVANAP]
\r
1215 client request to delete account for <nick>
\r
1217 612 (0x264) ban user [CLIENT]
\r
1219 [NAPSTER,OPENNAP,SLAVANAP]
\r
1221 <nick | ip> [ "<reason>" ]
\r
1223 client request to place a ban on either a specific nickname or
\r
1226 613 (0x265) set data port for user [CLIENT, SERVER]
\r
1228 [NAPSTER,OPENNAP,SLAVANAP]
\r
1230 client: <user> <port>
\r
1233 This command is used by administrators to request that another
\r
1234 client set the port used for data transfers to <port>. The server
\r
1235 sends a message with the requested port number to the target
\r
1236 client. NOTE: the target client can change its port number to
\r
1237 whatever it wishes using the 703 command.
\r
1239 614 (0x266) unban user [CLIENT]
\r
1241 [NAPSTER,OPENNAP,SLAVANAP]
\r
1243 Format: <nick | ip> [ "<reason>" ]
\r
1245 615 (0x267) show bans for server [CLIENT]
\r
1247 [NAPSTER,OPENNAP,SLAVANAP]
\r
1251 client requests the list of banned ips for the current server
\r
1253 616 (0x268) (ip?) ban list entry [SERVER]
\r
1255 [NAPSTER,OPENNAP,SLAVANAP]
\r
1257 Format: <ip> <nick> "<reason>" <time> <n>
\r
1259 <ip> is the string version of the ip banned
\r
1260 <nick> is the user setting the ban
\r
1261 <reason> is the reason given
\r
1262 <time> is the time_t when the ban was set
\r
1263 <n> is ???. value is either 0 or 1
\r
1265 This message is sent in response to the 615 client request, one
\r
1266 for each ban. The list is terminated with a 0 length 615 message
\r
1271 207.172.245. valkyrie "DoS exploit" 947304224 0
\r
1273 617 (0x269) list channels [CLIENT, SERVER]
\r
1275 [NAPSTER,OPENNAP,SLAVANAP]
\r
1279 client requests a list of channels on the server. server responds
\r
1282 server indicates end of channel list using this message.
\r
1284 618 (0x26a) channel list entry [SERVER]
\r
1286 [NAPSTER,OPENNAP,SLAVANAP]
\r
1288 Format: <channel-name> <number-of-users> <topic>
\r
1290 this is the server response to a 617 client request, one for each
\r
1295 Help 50 OpenNap help channel
\r
1297 619 (0x26b) queue limit [CLIENT]
\r
1299 [NAPSTER,OPENNAP,SLAVANAP]
\r
1301 Format: <nick> "<filename>" <n>
\r
1303 a client may limit the number of downloads from a particular client.
\r
1304 once the limit for a particular user has been reached, the uploading
\r
1305 client can send this message to notify the downloader that they
\r
1306 have hit the limit and can't have any more simultaneous downloads.
\r
1307 <nick> is the user who hit the limit, <filename> is the file they
\r
1308 were trying to download when they hit the limit, and <n> is the
\r
1309 number of simultaneous downloads allowed.
\r
1313 joebob "C:\MP3\Generic Band - Generic Song.mp3" 3
\r
1315 620 (0x26c) queue limit [SERVER]
\r
1317 [NAPSTER,OPENNAP,SLAVANAP]
\r
1319 <nick> "<filename>" <filesize> <digit>
\r
1321 This message is sent by the server in response to the 619 client
\r
1322 request, when one user needs to notify another that they have
\r
1323 reached the maximum allowed simultaneous downloads. When the server
\r
1324 recieves the 619 request from the uploading client, it sends the 620
\r
1325 message to the downloading client. The only difference in format is
\r
1326 the addition of the <nick> field in the 620 message which specifies
\r
1327 the username of the uploading agent which is notifying the
\r
1328 downloader that the queue is full.
\r
1332 joebob "C:\MP3\Generic Band - Generic Song.mp3" 1234567 3
\r
1334 621 (0x26d) message of the day [CLIENT, SERVER]
\r
1336 [NAPSTER,OPENNAP,SLAVANAP]
\r
1340 Server: each 621 message contains a single line of text.
\r
1341 OpenNap and SlavaNap servers send string
\r
1342 "VERSION opennap 0.41" or "VERSION SlavaNap 1.1.3"
\r
1343 among other MOTD strings. This might be used to
\r
1344 detect server version.
\r
1346 Client: client sends a 621 command with no data to request the
\r
1347 motd be sent. The server will usually send this
\r
1348 automatically after a user logs in, so this command
\r
1349 allows a user to reread it upon request.
\r
1351 622 (0x26e) muzzle a user [CLIENT]
\r
1353 [NAPSTER,OPENNAP,SLAVANAP]
\r
1355 <nick> [ "<reason>" ]
\r
1357 client requests that <nick> not be allowed to send public messages
\r
1359 623 (0x26f) unmuzzle a user [CLIENT]
\r
1361 [NAPSTER,OPENNAP,SLAVANAP]
\r
1363 <nick> [ "<reason>" ]
\r
1365 client requests that the enforced silence on <nick> be lifted
\r
1367 624 (0x270) un-nuke a user [CLIENT]
\r
1373 625 (0x271) change user's linespeed [CLIENT]
\r
1375 [NAPSTER,OPENNAP,SLAVANAP]
\r
1379 626 (0x272) data port error [CLIENT, SERVER]
\r
1381 [NAPSTER,OPENNAP,SLAVANAP]
\r
1385 When a downloading client detects that the uploader's data port
\r
1386 is unreachable, it should send a 626 message to the server with
\r
1387 the nick of the user for which the connection failed. The server
\r
1388 then relays the message to the uploader, substituing the
\r
1389 downloader's nickname in the message.
\r
1391 627 (0x273) operator message [CLIENT, SERVER]
\r
1393 [NAPSTER,OPENNAP,SLAVANAP]
\r
1396 server: <nick> <text>
\r
1398 client request to send a message to all admins/moderators
\r
1400 628 (0x274) global message [CLIENT, SERVER]
\r
1402 [NAPSTER,OPENNAP,SLAVANAP]
\r
1405 server: <nick> <text>
\r
1407 client request send a message to all users
\r
1409 629 (0x275) banned users [SERVER]
\r
1415 when displaying the ban list for the server, this message is used
\r
1416 to indicate banned nicknames.
\r
1420 640 direct browse request [CLIENT, SERVER]
\r
1422 [NAPSTER,OPENNAP,SLAVANAP]
\r
1425 Server: <nick> [ip port]
\r
1427 Client: request files for <nick>
\r
1428 Server: <nick> is requesting your files. optionally, <ip> and
\r
1429 <port> are given if the client getting browsed is firewalled
\r
1431 This message is sent to initiate a direct client to client browsing of
\r
1436 641 direct browse accept [CLIENT, SERVER]
\r
1438 [NAPSTER,OPENNAP,SLAVANAP]
\r
1441 Server: <nick> <ip> <port>
\r
1443 The client to be browsed sends this message back to the server to
\r
1444 indicate it is willing to accept a direct browse from <nick>.
\r
1446 The server sends this message to the requestor of the browse to
\r
1447 indicate where it should connect in order to do a direct browse from
\r
1452 642 direct browse error [SERVER]
\r
1454 [NAPSTER,OPENNAP,SLAVANAP]
\r
1458 Server sends this messags in response to a 640 request if there is an
\r
1459 error (eg. both clients are firewalled, or the browsee is not sharing
\r
1466 650-651 ??? [CLIENT]
\r
1469 permission denied.
\r
1471 652 (0x28c) cloak user [CLIENT]
\r
1473 [NAPSTER,OPENNAP,SLAVANAP]
\r
1475 sets the current user to "invisible"
\r
1479 700 change link speed [CLIENT]
\r
1481 [NAPSTER,OPENNAP,SLAVANAP]
\r
1485 client is notifying server that its correct link speed is <speed>,
\r
1486 in the range 0-10 (see the login message for details).
\r
1488 701 change user password [CLIENT]
\r
1490 [NAPSTER,OPENNAP,SLAVANAP]
\r
1494 client wishes to change their password
\r
1496 702 change email address [CLIENT]
\r
1502 client wishes to change their email address
\r
1504 703 change data port [CLIENT]
\r
1506 [NAPSTER,OPENNAP,SLAVANAP]
\r
1510 client is changing the data port being listened on for file
\r
1515 748 login attempt [SERVER]
\r
1517 [NAPSTER,OPENNAP,SLAVANAP]
\r
1519 the server sends this message to a logged in client when another
\r
1520 client attempts to log in with the same nickname.
\r
1524 750 (0x2ee) server ping [CLIENT, SERVER]
\r
1526 [NAPSTER,OPENNAP,SLAVANAP]
\r
1530 Client pings server. Server replies with 750. <time> is in time_t
\r
1531 format. Napster console command: "/sping"
\r
1533 OpenNap uses <server> instead of <time> where <server> is server
\r
1536 751 (0x2ef) ping user [CLIENT, SERVER]
\r
1538 [NAPSTER,OPENNAP,SLAVANAP]
\r
1542 client is attempting to determine if <user>'s connection is alive
\r
1544 752 (0x2f0) pong response [CLIENT, SERVER]
\r
1546 [NAPSTER,OPENNAP,SLAVANAP]
\r
1550 this message is sent in response to the the 751 (PING) requeset
\r
1552 753 (0x2f1) change password for another user [CLIENT]
\r
1554 [NAPSTER,OPENNAP,SLAVANAP]
\r
1556 <user> <password> "<reason>"
\r
1558 allows an administrator to change the password for another user
\r
1565 permission denied.
\r
1570 permission denied.
\r
1574 800 (0x320) reload config [CLIENT]
\r
1580 resets configuration parameter to its default value
\r
1582 801 (0x321) server version [CLIENT]
\r
1584 [NAPSTER,OPENNAP,SLAVANAP]
\r
1588 client request's a server's version
\r
1595 [returns permission denied. -ed]
\r
1597 810 (0x32a) set config [CLIENT]
\r
1602 request a change in server configuration variables
\r
1604 811 (0x32b) ??? [CLIENT]
\r
1607 [returns permission denied. -ed]
\r
1609 820 (0x334) clear channel [CLIENT]
\r
1611 [NAPSTER,OPENNAP,SLAVANAP]
\r
1615 remove all users from the specified channel
\r
1617 821 (0x335) redirect client to another server [CLIENT, SERVER]
\r
1619 [NAPSTER,OPENNAP,SLAVANAP]
\r
1621 client: <user> <server> <port>
\r
1622 server: <server> <port>
\r
1624 This command allows an administrator to redirect clients to another
\r
1627 822 (0x336) cycle client [CLIENT, SERVER]
\r
1629 [NAPSTER,OPENNAP,SLAVANAP]
\r
1631 client: <user> <metaserver>
\r
1632 server: <metaserver>
\r
1634 This commands allows an administrator to make a client restart the
\r
1635 login process by first connecting to the metaserver (redirector) at
\r
1638 823 (0x337) set channel level [CLIENT]
\r
1640 [NAPSTER,OPENNAP,SLAVANAP]
\r
1644 Sets <channel> such that users must be at least <level> in order to
\r
1647 824 (0x338) emote [CLIENT, SERVER]
\r
1649 [NAPSTER,OPENNAP,SLAVANAP]
\r
1651 client: <channel> "<text>"
\r
1652 server: <channel> <user> "<text>"
\r
1654 A variation of the public message command to indicate an action by
\r
1655 the user. Often implemented as the "/me" command in IRC clients.
\r
1657 825 (0x339) user list entry [SERVER]
\r
1659 [NAPSTER,OPENNAP,SLAVANAP]
\r
1661 <channel> <user> <files shared> <speed>
\r
1663 an 825 message is sent for each user in the channel specified by the
\r
1670 [This appears to be exactly the same format as the 408 message. -ed]
\r
1672 826 (0x33a) channel limit [CLIENT]
\r
1674 [NAPSTER,OPENNAP,SLAVANAP]
\r
1678 sets the maximum number of users that may enter a channel. <limit>
\r
1679 is an integer value between 0 and 999999999. setting it higher that
\r
1680 this results in the limit being set to -1. by default, created
\r
1681 channels have a limit of 200. there appears to be no restriction on
\r
1682 any channel member changing the limit, and no notification is given
\r
1684 827 (0x33b) show all channels [CLIENT, SERVER]
\r
1686 [NAPSTER,OPENNAP,SLAVANAP]
\r
1690 client request to show all channels, including "hidden" channels.
\r
1691 the server also sends this message to terminate
\r
1693 828 (0x33c) channel list [SERVER]
\r
1695 [NAPSTER,OPENNAP,SLAVANAP]
\r
1697 <channel> <users> <n1> <level> <limit> "<topic>"
\r
1699 the server sends a list of 828 commands, one for each channel,
\r
1700 including "hidden" channels that don't show up in the normal channel
\r
1703 <level> is the mimimum user level required for entry into a channel
\r
1704 <limit> is the max number of users allowed in a channel
\r
1706 <n1> is either 0 or 1. seems to be 1 if the channel was user
\r
1707 created, or 0 if a predefined channel???
\r
1709 829 (0x33d) kick user from channel [CLIENT]
\r
1711 [NAPSTER,OPENNAP,SLAVANAP]
\r
1713 <channel> <user> [ "<reason>" ]
\r
1715 830 (0x33e) list users in channel [CLIENT, SERVER]
\r
1717 [NAPSTER,OPENNAP,SLAVANAP]
\r
1721 client requests a list of all users in <channel>. server responds
\r
1722 with a 825 response for each user, followed by an 830 response with
\r
1723 no data [why didn't they just use the 409 message? -ed]
\r
1725 831 (0x33f) global user list [CLIENT, SERVER]
\r
1727 [NAPSTER?,OPENNAP,SLAVANAP]
\r
1731 Napster returns "premission denied."
\r
1732 OpenNap and SlavaNap return sequence of 832 command. List of users
\r
1733 is terminated with empty 831 command.
\r
1735 832 (0x340) global user list entry [SERVER]
\r
1737 [OPENNAP,SLAVANAP]
\r
1741 Response to message 831.
\r
1745 870 add files by directory [CLIENT]
\r
1747 [NAPSTER,OPENNAP,SLAVANAP]
\r
1749 Format: "<directory>" "<file>" <md5> <size> <bitrate> <freq> <duration>
\r
1752 This command allows a client to share multiple files in the same
\r
1753 directory as a shortcut to multiple 100 (share file) commands.
\r
1754 <directory> is the path which should be prepended to all the given
\r
1755 filenames in the rest of the command. <file> is the name of the file
\r
1756 to share *without* its directory component. When other clients do a
\r
1757 browse/share, the real path will be reported as <directory>/<file>.
\r
1759 The portion of this command after the <directory> may be repeated as
\r
1760 many times as necessary for files in the same directory. NOTE: most
\r
1761 servers will not accept commands of length longer than 2048 bytes
\r
1762 so you still may need to break up the files into multiple commands
\r
1763 if there are many files in a single directory.
\r
1767 900 connection test [SERVER]
\r
1771 <ip> <port> <data>
\r
1773 <ip> - string, ip address to connect to.
\r
1774 <port> - integer, port to connect to
\r
1775 <data> - string, data to send to server.
\r
1777 Try to connect to <ip> on <port> for atmost 1000 seconds. If the
\r
1778 connection succeeds send the <data> to target.
\r
1780 [reported by Thomas van der Heijden <thom@bart.nl>]
\r
1782 901 listen test [SERVER]
\r
1786 <port> <timeout> <data>
\r
1788 <port> - integer, port to listen on
\r
1789 <timeout> - integer, time to wait for connection in seconds
\r
1790 <data> - string, data to send after connection has been made.
\r
1792 Listen on <port> for <timeout> seconds. If a connection arrives,
\r
1793 return <data> to sender.
\r
1795 [reported by Thomas van der Heijden <thom@bart.nl>]
\r
1797 920 socket test [CLIENT]
\r
1799 [NAPSTER,OPENNAP,SLAVANAP]
\r
1801 Format: <some_digit>
\r
1803 This is sent by the Beta8+ client prior to login.
\r
1805 SlavaNap server uses this command to detect byte order for big-endian
\r
1806 clients (SlavaNap supports clients with big-endian and little-endian).
\r
1808 OpenNap just ignores this command.
\r
1810 931 blocked file [SERVER]
\r
1812 [NAPSTER,SLAVANAP]
\r
1816 This message is used by server to inform client
\r
1817 that file is blocked.
\r
1818 Used as reply to commands 100, 870, 10300
\r
1820 932 new share [CLIENT]
\r
1824 Format: <binary data>
\r
1826 This message is used by Napster 10.2+ to share
\r
1827 files that have ID3v2 tags. Format of binary data:
\r
1828 (C language, int = 4 bytes)
\r
1831 int real_size; // file size without ID3 tags
\r
1840 char MD5[32]; // 36-67
\r
1844 If you want napster to share files using 720 instead of 932
\r
1845 change "1" to "0" at the end of each line in "shared.dat" file.
\r
1847 995 blocked file [SERVER]
\r
1851 Format: <binary data>
\r
1853 This message is used by Napster 10.2+ server to inform
\r
1854 client that file is blocked. This message is sent in reply
\r
1856 Length of data in reply may vary.
\r
1858 3.1 OpenNap and SlavaNap Message Types
\r
1860 The following messages are supported by both OpenNap and SlavaNap servers.
\r
1861 For complete list of OpenNap and SlavaNap commands see "README" file
\r
1862 for OpenNap or SlavaNap.
\r
1865 10112 show server links [CLIENT, SERVER]
\r
1867 [OPENNAP,SLAVANAP]
\r
1870 server: <host> <host> <hops>
\r
1872 This command is used to show information about the links a
\r
1873 server has to other servers. The list is terminated by a 10112
\r
1874 message with no data (0 length).
\r
1876 Current version of SlavaNap do not support this command completely
\r
1877 and replies with empty 10112 message. This command is implemented
\r
1878 by SlavaNap only because AudioGnome uses it.
\r
1880 10115 show server stats [CLIENT, SERVER]
\r
1882 [OPENNAP,SLAVANAP]
\r
1885 server: <clients> <servers> <files> <gigs> <channels> <time>
\r
1886 <uptime> <memory> <numusers>
\r
1888 This command is used by administrators to get information about the
\r
1889 state of the server.
\r
1891 <clients> number of locally connected clients
\r
1892 <servers> number of locally connected servers
\r
1893 <users> total number of global users
\r
1894 <files> number of files in the db
\r
1895 <gigs> total size of all files shared
\r
1896 <channels> number of active channels
\r
1897 <time> time at which the server was started
\r
1898 <uptime> number of seconds of uptime
\r
1899 <memory> if debugging is enabled, this will show the memory
\r
1900 currently in use, otherwise it will be -1
\r
1901 <numusers> number of registered users
\r
1903 10118 display client information statistics [CLIENT, SERVER]
\r
1905 [OPENNAP,SLAVANAP]
\r
1907 Available only if OpenNap was compiled with --enable-version-stats or
\r
1908 "Enable version stats" was enabled in SlavaNap settings menu.
\r
1910 The server will dump its lists of known clients and the number
\r
1911 of logins for each. It does not keep track of unique ips, so this
\r
1912 just gives a rough estimate on the popularity of various clients.
\r
1915 (server): "<version>" <count>
\r
1917 The server's list is terminated by an empty 10118 message.
\r
1919 10121 who was [CLIENT]
\r
1921 [OPENNAP,SLAVANAP]
\r
1925 Displays info about a user that has recently logged out.
\r
1927 10200 Register user [CLIENT]
\r
1929 [OPENNAP, SLAVANAP]
\r
1931 Format: <user> <pass> <email> [ <level> ]
\r
1933 admin command to force registration of a nickname.
\r
1934 Note: for SlavaNap <level> is required and shouldn't be "user"
\r
1936 10204 set channel op [CLIENT]
\r
1938 [OPENNAP,SLAVANAP]
\r
1940 Format: <channel> <user> [user ...]
\r
1942 enable <user> to kick/ban users on <channel>
\r
1944 10205 remove channel op [CLIENT]
\r
1946 [OPENNAP,SLAVANAP]
\r
1948 Format: <channel> <user> [user ...]
\r
1950 remove <user> as operator on <channel>
\r
1952 10207 drop channel [CLIENT]
\r
1954 [OPENNAP,SLAVANAP]
\r
1956 Format: <channel> [ "<reason>" ]
\r
1958 marks the specified channel as being user created such that its
\r
1959 state is not stored in the persistent channels file and will
\r
1960 disappear once all users part from it.
\r
1962 10208 send message to channel ops [CLIENT, SERVER]
\r
1964 [OPENNAP,SLAVANAP]
\r
1966 client: <channel> <message>
\r
1967 server: <channel> <code> <text>
\r
1969 client: sends <message> to all operators and mods+ on <channel>
\r
1970 server: sends message with code <code> and <text> to all operators
\r
1971 (can be used only by another server) (n/a yet)
\r
1973 10209 change channel mode [CLIENT, SERVER]
\r
1975 [OPENNAP,SLAVANAP]
\r
1977 Format: <channel> [mode [mode ...]]
\r
1979 if specified, [mode] is of the form
\r
1983 where STRING is one of
\r
1985 PRIVATE - makes the channel not show up in the list
\r
1986 MODERATED - only ops and mods+ can speak in public
\r
1987 TOPIC - if set, any user may change the topic
\r
1990 INVITE - channel is invite only
\r
1993 REGISTERED - if set, channel will not be destroyed after
\r
1994 all users will part from it.
\r
1996 if [mode] is not specified servers returns current mode.
\r
1998 10210 invite user to a channel [CLIENT] (depreciated. use 430 instead)
\r
2000 [OPENNAP,SLAVANAP]
\r
2002 Format: <channel> <user>
\r
2004 This message is OpenNap version of 430 message.
\r
2006 10211 give voice to speak in moderated channel [CLIENT]
\r
2008 [OPENNAP,SLAVANAP]
\r
2010 Format: <channel> [user [user ...]]
\r
2012 10212 remove voice to speak in moderated channel [CLIENT]
\r
2014 [OPENNAP,SLAVANAP]
\r
2016 Format: <channel> [user [user ...]]
\r
2018 10300 share generic media file [CLIENT]
\r
2020 [OPENNAP,SLAVANAP]
\r
2022 Format: "<filename>" <size> <md5> <major-content-type>
\r
2024 <content-type> is the major MIME type defined for what the data is.
\r
2026 audio, video, text, image, application, mp3
\r
2027 NOTE: mp3 is a separate type here since the original
\r
2028 nap protocol was designed for sharing only mp3 files.
\r
2029 "audio" refers to other types of audio files
\r
2031 MD5 is counted the same way as for command 100.
\r
2035 "C:\IMAGES\Grand Canyon.jpg" 54187 bc938fdc0ef63772bfbdbf57aabb0860-54187 image
\r
2036 "\home\drscholl\src\opennap-0.11.tar.gz" 102161 51c07734811a26853b1a2a87b67c68a1-102161 application
\r
2041 All MP3 files are hashed using the first 300,032 bytes of the file.
\r
2042 WMA files are not hashed and Napster sends "WMA-FILE" instead of MD5 for .wma
\r
2044 The current method seems to be: skip id3v2, seek to frame sync and hash.
\r
2046 Note: the linux nap client (versions 0.7 - 0.9) hash exactly 300,000
\r
2047 bytes, which is NOT what the official windows client does.
\r
2049 Correct format for MD5 is something like "58dc354f81bf37b050799ead7ca8d3bc-5333975"
\r
2050 where "58dc354f81bf37b050799ead7ca8d3bc" is MD5 hash and "5333975" is file
\r
2051 length - length of ID3 tags (v1 and v2).
\r
2053 Some clients ignore MD5 or send incorrect values. For example, WinMX sends MD5
\r
2054 without file size and FileNavigator sends "AAAAAA" (32 "A" characters) instead
\r
2055 of MD5. OpenNap and SlavaNap ignore md5 and do not support it by default
\r
2056 unless recompiled using special options.
\r
2059 5. Client-Client Protocol
\r
2061 File transfer occur directly between clients without passing through the
\r
2062 server. There are four transfer modes, upload, download, firewalled upload,
\r
2063 firewalled download. The normal method of transfer is that the client
\r
2064 wishing to download a file makes a TCP connection to the client holding the
\r
2065 file on their data port. However, in the case where the client sharing the
\r
2066 file is behind a firewall, it is necessary for them to "push" the data by
\r
2067 making a TCP connection to the downloader's data port.
\r
2070 5.1 Normal Downloading
\r
2072 Regardless of which mode, the downloading client will first issue either a
\r
2073 search(200) or browse(211) command to the server. This returns a list of
\r
2074 files and information on the client sharin the file. To request a download,
\r
2075 a get(203) request is sent to the server. The server will respond with
\r
2076 a get ack(204) containing more detailed information.
\r
2078 This is the point at which the different methods diverge. If the 204 get
\r
2079 ack says that the remote clients data port is 0, you must send a 500 request
\r
2080 to the server requesting that the remote client send the data to you. In
\r
2081 this case you wait for the remote client to connect to your own data port.
\r
2083 In the case where the sharing client is not firewalled, you make a TCP
\r
2084 connection to the data port specified in the 204 message from the server.
\r
2085 The remote client should accept the connection and immediately send one
\r
2086 ASCII char, `1' (ASCII 49). Once you read this char, you send a request
\r
2087 for the file you wish to download. First send the string "GET" in a single
\r
2089 <mynick> "<filename>" <offset>
\r
2090 where <mynick> is your napster user name, <filename> is the file you wish to
\r
2091 download, and <offset> if the byte offst in the file to begin the transfer
\r
2092 at (if you are downloading for the first time, and not resuming a prior
\r
2093 transfer, you should uses 0 to start at the beginning of the file).
\r
2095 The remote client will then return the file size, or an error message such
\r
2096 as "INVALID REQUEST" or "FILE NOT SHARED". Note that the file size is not
\r
2097 terminated in any special way, and the best way to figure out the size is to
\r
2098 keep reading until you hit a character that is not a digit (it will usually
\r
2099 be 0xff which is the start of the MP3 frame sync header, but if a ID3v2
\r
2100 tag is present it might look different). Immediately following the file
\r
2101 size is where the data stream for the file begins.
\r
2103 Once the data transfer is initiated, the downloader should notify the server
\r
2104 that they are downloading a file by sending the 218 message. Once the
\r
2105 transfer is complete, you send a 219 message to indicate you have finished
\r
2106 the download. Note that this is cummalitive, so that if you are downloading
\r
2107 multiple files, you send one 218/219 pair for EACH concurrent download--this
\r
2108 is how the server knows how many transfers you have going on. Likewise,
\r
2109 the uploader should send one 220 messge for each upload, and one 221 when
\r
2110 each upload has finished.
\r
2113 5.2 Firwalled Downloading
\r
2115 As described above, when the file needs to be pushed from a client behind a
\r
2116 firewall, the downloader sends a 500 message to the server. This causes a
\r
2117 501 message to be sent to the uploader, which is similar to the 204 message
\r
2118 for a normal download.
\r
2120 Once the uploader receives the 501 message from the server, they should make
\r
2121 a TCP connection to the downloader's data port (given in the 501 message).
\r
2122 Upon connection, the downloader's client will sent one byte, the ASCII
\r
2123 character `1'. The uploader should then send the string "SEND" in a single
\r
2124 packet, and then the information:
\r
2125 <mynick> "<filename>" <size>
\r
2126 where <mynick> is the uploader's napster user name, <filename> is the file
\r
2127 being sent, and <size> is the size of the file in bytes.
\r
2129 Upon receipt, the downloading client will either send the byte offset at
\r
2130 whcih the transfer should start, or an error message such as
\r
2131 "INVALID REQUEST". The byte offset should be sent as a single packet
\r
2132 in plain ASCII digits. Just as with above in section 5.1, a 0 byte offset
\r
2133 indicates the transfer should begin at the start of the file. If you are
\r
2134 writing a nap client and have trouble with firewalled downloading first
\r
2135 check if you are sending offset in ASCII (this is the most common error)
\r
2137 Each client should notify the server that they are uploading or downloading
\r
2138 with the 218/219 (downloading) or 220/221 (uploading) command pairs (see
\r
2139 section 5.1 for more detailed information).
\r
2142 5.3 Client to Client Browsing
\r
2144 Napster 2.0 Beta 8 adds a feature which allows direct client-to-client
\r
2145 browsing of file lists. Direct browsing is supported by Napster Beta 8-9.6
\r
2146 From Napster 2.0 Beta 10 direct browsing is disabled. To request a browse,
\r
2149 command. The server then sends a
\r
2151 to the client which is getting browsed with the nick of the client that is
\r
2152 requesting the browse. If the client accepts the browse request, it sends
\r
2155 to the server with the nick of the client requesting the browse. The
\r
2156 server then sends a
\r
2157 641 <nick> <ip> <port>
\r
2158 to the requesting client. In the case of an error, the server will send a 642
\r
2159 command in response to the 640 command.
\r
2161 The browsing client then makes a TCP conection to the remote client's data
\r
2162 port. After getting the "1" character, the browsing client sends a
\r
2164 At which point the remote client sends its nick followed by a linefeed (\n)
\r
2165 by itself in a single packet (ie, one write() call)
\r
2167 followed by the list of files being shared (the format being the same as
\r
2168 the data of the "share" command). Each line is terminated by a linefeed char.
\r
2169 At the end of the list, an additional linefeed char is sent and then the
\r
2170 client closes the connection.
\r
2172 In the case that the remote client is firewalled, the browse list will have to
\r
2173 be pushed to the requesting client. The remote client makes a TCP connection
\r
2174 to the requesting client, then sends
\r
2176 followed by the list of files, as with the "GETLIST" command response.
\r
2179 6. Napigator protocol specification
\r
2181 Napigator server runs on "stat.napigator.com" port 8890.
\r
2183 In this section when I use word "client" it means OpenNap or SlavaNap
\r
2184 server and when I use word "server" it means Napigator server.
\r
2186 Message format for server:
\r
2188 <id> [<text>] \r\n
\r
2190 <id> is message code in ASCII
\r
2191 <text> is message text. There is a space (" ") chacter between <id> and <text>.
\r
2192 Every line is terminated with \r\n (0x0D,0x0A) sequence. Strings should NOT be
\r
2195 Message format for client:
\r
2197 <command> [<text>] \r\n
\r
2199 <command> is text command (like USER or PASS)
\r
2200 Every line is terminated with \r\n (0x0D,0x0A) sequence. String should NOT be
\r
2203 When client connects to server, server should send command 220. Client replies
\r
2204 with "USER". Then server sends command 300. Client replies with "PASS". If name
\r
2205 and password are correct server replies with 201.
\r
2207 Connection should be kept alive. Every 60 seconds (or any other period) client
\r
2208 sends "STATS" message.
\r
2212 200 stats updated.
\r
2214 No reply required.
\r
2218 Format: 201 <message>
\r
2220 Login sequence is complete.
\r
2221 Client should reply with "IPPORT".
\r
2223 220 request user name.
\r
2225 Format: 220 <salt_string>
\r
2227 Salt string used by client to encode password.
\r
2228 Client should reply with "USER" message.
\r
2232 Format: 221 <error>
\r
2234 Client should disconnect after receiving this message.
\r
2236 300 password request.
\r
2238 Client should reply with "PASS" command.
\r
2240 other messages: something is wrong and client should disconnect.
\r
2244 USER send user name
\r
2246 Format: USER <user_name>
\r
2248 PASS send user pass
\r
2250 Format: PASS <encoded_password>
\r
2252 password is encoded with MD5. Before encoding password you should
\r
2253 add salt string (that you have received with 220 message) to password.
\r
2257 If your password is "qwerty" and you have received "1234" as salt string,
\r
2258 encoded password will be MD5("qwerty1234");.
\r
2260 Note: MD5 letters should be in upper case.
\r
2262 IPPORT send server address.
\r
2264 Format: <hostname> <ip> <port>
\r
2266 Note: this command should be sent only when login sequence is completed.
\r
2268 STATS update server stats.
\r
2270 Format: <hostname> <users> <files> 0 <size> 0
\r
2272 <hostname> is name of your server (ex. cyberalien.servemp3.com)
\r
2273 <users> is number of connected users (ASCII)
\r
2274 <files> is number of shared files (ASCII)
\r
2275 <size> is size of files in Gb (ASCII)
\r
2277 Note: this command cannot be used before login sequence is completed.
\r
2279 If you have created Napigator-compatible server mail me at mailto:cyberalien@users.sourceforge.net
\r
2280 and I'll add support for your server to SlavaNap.
\r
2281 To add you server support to OpenNap mail Dr.Scholl at mailto:drscholl@users.sourceforge.net
\r
2284 7. Where to get more help?
\r
2286 Join the napdev mailing list by sending email to mailto:napdev-subscribe@onelist.com
\r
2287 or by visiting the community page http://www.onelist.com/community/napdev/.
\r
2288 This list is designed for open source nap developers to share information
\r
2289 about the specification or applications.
\r
2291 Latest version of this document is available at http://slavanap2.sourceforge.net/nap.txt
\r
2292 Original document is available at http://opennap.sourceforge.net/napster.txt
\r
2294 Some implementations of this protocol (servers and clients) come with
\r
2295 source code. Visit http://slavanap2.sourceforge.net or http://opennap.sourceforge.net
\r
2296 for more information.
\r
2299 8. Servers compatible with this protocol:
\r
2301 For Linux: OpenNap http://opennap.sourceforge.net
\r
2302 For Win32: SlavaNap http://slavanap2.sourceforge.net
\r
2303 Java: JNerve http://jnerve.sourceforge.net (outdated)
\r
2305 9. Acknowledgements
\r
2307 A big THANKS goes to the following people who contributed valuable information
\r
2308 to this specification:
\r
2310 Ben Byer <bbyer@rice.edu>
\r
2311 JT <jtraub@dragoncat.net>
\r
2312 Evan Martin <eeyem@u.washington.edu>
\r
2313 Colten Edwards (aka panasync@efnet) <edwards@bitchx.dimension6.com>
\r
2314 Thomas van der Heijden <thom@bart.nl>
\r