~ubuntu-branches/ubuntu/quantal/open-vm-tools/quantal-201207201942

« back to all changes in this revision

Viewing changes to modules/linux/vsock/linux/notify.c

  • Committer: Bazaar Package Importer
  • Author(s): Daniel Baumann
  • Date: 2009-10-18 12:28:19 UTC
  • mfrom: (1.1.7 upstream) (2.4.9 squeeze)
  • Revision ID: james.westby@ubuntu.com-20091018122819-00vqew6m0ztpqcqp
Tags: 2009.10.15-201664-1
MergingĀ upstreamĀ versionĀ 2009.10.15-201664.

Show diffs side-by-side

added added

removed removed

Lines of Context:
33
33
#include "af_vsock.h"
34
34
 
35
35
#define PKT_FIELD(vsk, fieldName) \
36
 
   (vsk)->notify.fieldName
 
36
   (vsk)->notify.pkt.fieldName
37
37
 
38
38
#define VSOCK_MAX_DGRAM_RESENDS       10
39
39
 
1124
1124
   }
1125
1125
}
1126
1126
 
 
1127
 
 
1128
/*
 
1129
 *----------------------------------------------------------------------------
 
1130
 *
 
1131
 * VSockVmciNotifyPktProcessRequest
 
1132
 *
 
1133
 *      Called near the end of process request.
 
1134
 *
 
1135
 * Results:
 
1136
 *      None.
 
1137
 *
 
1138
 * Side effects:
 
1139
 *      None.
 
1140
 *
 
1141
 *----------------------------------------------------------------------------
 
1142
 */
 
1143
 
 
1144
static void
 
1145
VSockVmciNotifyPktProcessRequest(struct sock *sk) // IN
 
1146
{
 
1147
   VSockVmciSock *vsk;
 
1148
 
 
1149
   ASSERT(sk);
 
1150
 
 
1151
   vsk = vsock_sk(sk);
 
1152
 
 
1153
   PKT_FIELD(vsk, writeNotifyWindow) = vsk->consumeSize;
 
1154
}
 
1155
 
 
1156
 
 
1157
/*
 
1158
 *----------------------------------------------------------------------------
 
1159
 *
 
1160
 * VSockVmciNotifyPktProcessNegotiate
 
1161
 *
 
1162
 *      Called near the end of process negotiate.
 
1163
 *
 
1164
 * Results:
 
1165
 *      None.
 
1166
 *
 
1167
 * Side effects:
 
1168
 *      None.
 
1169
 *
 
1170
 *----------------------------------------------------------------------------
 
1171
 */
 
1172
 
 
1173
static void
 
1174
VSockVmciNotifyPktProcessNegotiate(struct sock *sk) // IN
 
1175
{
 
1176
   VSockVmciSock *vsk;
 
1177
 
 
1178
   ASSERT(sk);
 
1179
 
 
1180
   vsk = vsock_sk(sk);
 
1181
 
 
1182
   PKT_FIELD(vsk, writeNotifyWindow) = vsk->consumeSize;
 
1183
}
 
1184
 
 
1185
 
1127
1186
/* Socket control packet based operations. */
1128
1187
VSockVmciNotifyOps vSockVmciNotifyPktOps = {
1129
1188
   VSockVmciNotifyPktSocketInit,
1138
1197
   VSockVmciNotifyPktSendInit,
1139
1198
   VSockVmciNotifyPktSendPreBlock,
1140
1199
   VSockVmciNotifyPktSendPreEnqueue,
1141
 
   VSockVmciNotifyPktSendPostEnqueue
 
1200
   VSockVmciNotifyPktSendPostEnqueue,
 
1201
   VSockVmciNotifyPktProcessRequest,
 
1202
   VSockVmciNotifyPktProcessNegotiate,
1142
1203
};