nmbd/nmbd_nodestatus.c

ソースコードを見る。

関数

static void node_status_response (struct subnet_record *subrec, struct response_record *rrec, struct packet_struct *p)
static void node_status_timeout_response (struct subnet_record *subrec, struct response_record *rrec)
BOOL node_status (struct subnet_record *subrec, struct nmb_name *nmbname, struct in_addr send_ip, node_status_success_function success_fn, node_status_fail_function fail_fn, struct userdata_struct *userdata)


関数

static void node_status_response ( struct subnet_record subrec,
struct response_record rrec,
struct packet_struct p 
) [static]

nmbd_nodestatus.c30 行で定義されています。

参照先 nmb_packet::answerspacket_struct::ippacket_struct::nmbnmb_name_equal()nmb_namestr()response_record::packetpacket_struct::packetnmb_packet::questionnmb_packet::question_nameremove_response_record()res_rec::rr_namesubnet_record::subnet_nameresponse_record::success_fnresponse_record::userdata.

参照元 node_status().

00032 {
00033         struct nmb_packet *nmb = &p->packet.nmb;
00034         struct nmb_name *question_name = &rrec->packet->packet.nmb.question.question_name;
00035         struct nmb_name *answer_name = &nmb->answers->rr_name;
00036 
00037         /* Sanity check. Ensure that the answer name in the incoming packet is the
00038                 same as the requested name in the outgoing packet. */
00039 
00040         if(!nmb_name_equal(question_name, answer_name)) {
00041                 DEBUG(0,("node_status_response: Answer name %s differs from question \
00042 name %s.\n", nmb_namestr(answer_name), nmb_namestr(question_name)));
00043                 return;
00044         }
00045 
00046         DEBUG(5,("node_status_response: response from name %s on subnet %s.\n",
00047                 nmb_namestr(answer_name), subrec->subnet_name));
00048 
00049         /* Just send the whole answer resource record for the success function to parse. */
00050         if(rrec->success_fn)
00051                 (*(node_status_success_function)rrec->success_fn)(subrec, rrec->userdata, nmb->answers, p->ip);
00052 
00053         /* Ensure we don't retry. */
00054         remove_response_record(subrec, rrec);
00055 }

static void node_status_timeout_response ( struct subnet_record subrec,
struct response_record rrec 
) [static]

nmbd_nodestatus.c61 行で定義されています。

参照先 response_record::fail_fnpacket_struct::nmbnmb_namestr()packet_struct::packetresponse_record::packetnmb_packet::questionnmb_packet::question_nameremove_response_record()subnet_record::subnet_name.

参照元 node_status().

00063 {
00064         struct nmb_packet *sent_nmb = &rrec->packet->packet.nmb;
00065         struct nmb_name *question_name = &sent_nmb->question.question_name;
00066 
00067         DEBUG(5,("node_status_timeout_response: failed to get node status from name %s on subnet %s\n",
00068                 nmb_namestr(question_name), subrec->subnet_name));
00069 
00070         if( rrec->fail_fn)
00071                 (*rrec->fail_fn)(subrec, rrec);
00072 
00073         /* Ensure we don't retry. */
00074         remove_response_record(subrec, rrec);
00075 }

BOOL node_status ( struct subnet_record subrec,
struct nmb_name nmbname,
struct in_addr  send_ip,
node_status_success_function  success_fn,
node_status_fail_function  fail_fn,
struct userdata_struct userdata 
)

nmbd_nodestatus.c81 行で定義されています。

参照先 nmb_namestr()node_status_response()node_status_timeout_response()queue_node_status().

参照元 find_all_domain_master_names_query_success()find_domain_master_name_query_success().

00084 {
00085         if(queue_node_status( subrec, node_status_response, node_status_timeout_response,
00086                                 success_fn, fail_fn, userdata, nmbname, send_ip)==NULL) {
00087                 DEBUG(0,("node_status: Failed to send packet trying to get node status for \
00088 name %s, IP address %s\n", nmb_namestr(nmbname), inet_ntoa(send_ip)));
00089                 return True;
00090         } 
00091         return False;
00092 }


Sambaに対してSat Aug 29 21:23:53 2009に生成されました。  doxygen 1.4.7