r955: Update debian package rules... builds now
[samba.git] / prog_guide.txt
index a9cdf8b74156d010d98c479be05801f0f46b039a..3523edb4e7c82e03036301e3a8a74a571ad6c40f 100644 (file)
@@ -2,8 +2,6 @@ THIS IS INCOMPLETE! I'M ONLY COMMITING IT IN ORDER TO SOLICIT COMMENTS
 FROM A FEW PEOPLE. DON'T TAKE THIS AS THE FINAL VERSION YET.
 
 
-
-
 Samba4 Programming Guide
 ------------------------
 
@@ -550,6 +548,73 @@ In Samba4 you can choose the smbd process model on the smbd command
 line. 
 
 
+DCERPC binding strings
+----------------------
+
+When connecting to a dcerpc service you need to specify a binding
+string. 
+
+The format is:
+
+  TRANSPORT:host:[flags]
+
+where TRANSPORT is either ncacn_np for SMB or ncacn_ip_tcp for RPC/TCP
+
+"host" is an IP or hostname or netbios name
+
+"flags" can include a SMB pipe name if using the ncacn_np transport or
+a TCP port number if using the ncacn_ip_tcp transport, otherwise they
+will be auto-determined.
+
+other recognised flags are:
+
+  sign : enable ntlmssp signing
+  seal : enable ntlmssp sealing
+  validate: enable the NDR validator
+  print: enable debugging of the packets
+  bigendian: use bigendian RPC
+
+
+For example, these all connect to the samr pipe:
+
+   ncacn_np:myserver
+   ncacn_np:myserver:samr
+   ncacn_np:myserver:samr,seal
+   ncacn_np:myserver:\pipe\samr
+   ncacn_np:myserver:/pipe/samr
+   ncacn_np:myserver[samr]
+   ncacn_np:myserver[\pipe\samr]
+   ncacn_np:myserver[/pipe/samr]
+   ncacn_np:myserver:[samr,sign,print]
+   ncacn_np:myserver:[\pipe\samr,sign,seal,bigendian]
+   ncacn_np:myserver:[/pipe/samr,seal,validate]
+
+   ncacn_ip_tcp:myserver
+   ncacn_ip_tcp:myserver:1024
+   ncacn_ip_tcp:myserver[1024]
+   ncacn_ip_tcp:myserver:[1024,sign,seal]
+
+
+IDEA: Maybe extend UNC names like this?
+
+ smbclient //server/share
+ smbclient //server/share:[sign,seal,spnego]
+
+DCERPC Handles
+--------------
+The various handles that are used in the RPC servers should be created and 
+fetch using the dcesrv_handle_* functions.
+
+Use dcesrv_handle_new(struct dcesrv_connection *, uint8 handle_type) to obtain 
+a new handle of the specified type. Handle types are unique within each 
+pipe.
+
+The handle can later be fetched again using
+struct dcesrv_handle *dcesrv_handle_fetch(struct dcesrv_connection *dce_conn, struct policy_handle *p, uint8 handle_type)
+and destroyed by dcesrv_handle_destroy(struct dcesrv_handle *).
+
+User data should be stored in the 'data' member of the dcesrv_handle struct.
+
 
 MSRPC
 -----
@@ -567,6 +632,9 @@ MSRPC
  - msrpc
 
 
+- use _p talloc varients
+
+don't zero structures! avoid ZERO_STRUCT() and talloc_zero()
 
 
 GMT vs TZ in printout of QFILEINFO timezones
@@ -685,3 +753,7 @@ docs
 
   conference paper
   developer docs
+
+svn instructions
+
+test commit