summaryrefslogtreecommitdiff
path: root/source4/libcli/nbt
AgeCommit message (Collapse)AuthorFilesLines
2007-10-10r5145: define struct ipv4_addr in misc.idl,Stefan Metzmacher4-5/+9
so we can use it in nbt.idl and get a nicer debug output metze (This used to be commit abacbc9192646f6f3c720758ab65889b82b9ae7b)
2007-10-10r5126: the composite code is no longer client specific or smb specific, soAndrew Tridgell1-7/+7
rename the core structure to composite_context and the wait routine to composite_wait() (suggestion from metze) (This used to be commit cf11d05e35179c2c3e51c5ab370cd0a3fb15f24a)
2007-10-10r5121: added periodic name refresh requests for all our registered names, ↵Andrew Tridgell4-6/+161
reporting any name conflicts (This used to be commit 69e6a1cd4bac665debb10601d1a3ddc0ae86e779)
2007-10-10r5120: encode outgoing nbt packets when queueing them rather than in the sendAndrew Tridgell2-30/+45
event code, as elements of the callers packet structure could go away while the queue is pending (if for example a name was de-registered while a packet referencing that name is queued) (This used to be commit 6726f15cf44388e5787eec223a8c9778110a508f)
2007-10-10r5117: used a composite function to add 4 stage name registration. We send 3Andrew Tridgell2-0/+145
broadcast name registration demands per name per interface at 1 second intervals, then send a name overwrite request and demand. Any name conflict replies are reported. (This used to be commit d656fba6f1a2e9d8c03893741327e5fb59c5271e)
2007-10-10r5114: the nbtd task can now act as a basic B-node server. It registers itsAndrew Tridgell4-16/+226
names on the network and answers name queries. Lots of details are still missing, but at least this now means you don't need a Samba3 nmbd to use Samba4. missing pieces include: - name registrations should be "shout 3 times, then demand" - no WINS server yet - no master browser code (This used to be commit d7d31fdc6670f026f96b50e51a4de19f0b920e5b)
2007-10-10r5108: the beginnings of a nbtd server for Samba4. Currently just displaysAndrew Tridgell3-3/+32
the packets it receives, but it at least shows how the server structure will work. To implement it I extended the libcli/nbt/ library to allow for an incoming packet handler to be registered. That allows the nbt client library to be used for low level processing of the nbtd server packets. Other changes: - made the socket library always set SO_REUSEADDR when binding to an interface, to ensure that restarts of a server don't have to wait for a couple of minutes. - made the nbt port configurable. Defaults to 137, but other ports will be useful for testing. (This used to be commit 2fedca6adfd4df9e85cc86896dfa79630777a917)
2007-10-10r4944: every event_add_*() caller was having to call talloc_steal() to takeAndrew Tridgell1-5/+2
control of the event, so instead build that into the function. If you pass NULL as mem_ctx then it leaves it as a child of the events structure. (This used to be commit 7f981b9ed96f39027cbfd500f41e0c2be64cbb50)
2007-10-10r4943: Smplified the events handling code a lot. The first source ofAndrew Tridgell1-12/+2
complexity was that events didn't automatically cleanup themselves. This was because the events code was written before we had talloc destructors, so you needed to call event_remove_XX() to clean the event out of the event lists from every piece of code that used events. I have now added automatic event destructors, which in turn allowed me to simplify a lot of the calling code. The 2nd source of complexity was caused by the ref_count, which was needed to cope with event handlers destroying events while handling them, which meant the linked lists became invalid, so the ref_count ws used to mark events for later destruction. The new system is much simpler. I now have a ev->destruction_count, which is incremented in all event destructors. The event dispatch code checks for changes to this and handles it. (This used to be commit a3c7417cfeab429ffb22d5546b205818f531a7b4)
2007-10-10r4927: parse the NBT session request in the smb server. This gets rid of thatAndrew Tridgell1-1/+12
annoying "not parsing session request" message on each SMB connection (This used to be commit b06b8dd2f4f4fea750b05fd29d68372828159f16)
2007-10-10r4915: free temp context _before_ the async callback, as the async callback ↵Andrew Tridgell1-1/+1
might destroy our top level context leaving the tmp context freed (so a double free) (This used to be commit b20c0561b8ec3ec7010f846be7a39165783e15c2)
2007-10-10r4909: fixed name_trn_id generation (thanks to metze for spotting the bug!)Andrew Tridgell1-1/+3
(This used to be commit 9d2d16ce5fd57cad01ddaf1112beed916cc2088d)
2007-10-10r4901: a bit more info on nbt packets under high debug levelAndrew Tridgell1-2/+5
(This used to be commit 9a34af29388d8ca837c670d054a76d1f75098cbd)
2007-10-10r4898: - removed the unused wins_srv_*() codeAndrew Tridgell1-2/+2
- expanded the generic async name resolver to try multiple methods - added wins resolutions to the list of methods tried - fixed up the random trn id generation to use the good random generator (This used to be commit 266fd2751c01808e5a18d4094032af50554ceb7a)
2007-10-10r4891: - added a generic resolve_name() async interface in libcli/resolve/,Andrew Tridgell4-71/+103
which will eventually try all resolution methods setup in smb.conf - only resolution backend at the moment is bcast, which does a parallel broadcast to all configured network interfaces, and takes the first reply that comes in (this nicely demonstrates how to do parallel requests using the async APIs) - converted all the existing code to use the new resolve_name() api - removed all the old nmb code (yay!) (This used to be commit 239c310f255e43dd2d1c2433f666c9faaacbdce3)
2007-10-10r4885: added a new NBT client library. Features include:Andrew Tridgell4-0/+1027
- structures defined using IDL in nbt.idl - build around our events structure, and talloc - fully async - supports all NBT packet fields as per rfc1002 - easy interfaces for name query and status For the moment there are just a couple of test functions in namequery.c, test_name_query() and test_name_status(). These will be removed when we hook the new library into libcli/ fully The new library will also be a fairly good basis for a nbt server. Although it can't be a server as-is, I wrote it with the needs of a server in mind (for example, extremely scalable idtree based packet handling) (This used to be commit ae7e625bfa4b4a3ee32c64566064b6a4c84ee4b9)