PERFORCE change 44963 for review
Andrew Reisse
areisse at FreeBSD.org
Thu Jan 8 19:01:18 GMT 2004
http://perforce.freebsd.org/chv.cgi?CH=44963
Change 44963 by areisse at areisse_ibook on 2004/01/08 11:00:56
Support for reading message labels from the trailer.
Affected files ...
.. //depot/projects/trustedbsd/sedarwin/apsl/bootstrap_cmds/migcom.tproj/lexxer.l#2 edit
.. //depot/projects/trustedbsd/sedarwin/apsl/bootstrap_cmds/migcom.tproj/parser.y#2 edit
.. //depot/projects/trustedbsd/sedarwin/apsl/bootstrap_cmds/migcom.tproj/routine.c#2 edit
.. //depot/projects/trustedbsd/sedarwin/apsl/bootstrap_cmds/migcom.tproj/routine.h#2 edit
.. //depot/projects/trustedbsd/sedarwin/apsl/bootstrap_cmds/migcom.tproj/type.c#2 edit
.. //depot/projects/trustedbsd/sedarwin/apsl/bootstrap_cmds/migcom.tproj/type.h#2 edit
Differences ...
==== //depot/projects/trustedbsd/sedarwin/apsl/bootstrap_cmds/migcom.tproj/lexxer.l#2 (text+ko) ====
@@ -138,6 +138,10 @@
<Normal>[Ss][Ee][Cc][Tt][Oo][Kk][Ee][Nn] RETURN(sySecToken);
<Normal>[Ss][Ee][Rr][Vv][Ee][Rr][Ss][Ee][Cc][Tt][Oo][Kk][Ee][Nn] RETURN(syServerSecToken);
<Normal>[Uu][Ss][Ee][Rr][Ss][Ee][Cc][Tt][Oo][Kk][Ee][Nn] RETURN(syUserSecToken);
+<Normal>[Mm][Ss][Gg][Ll][Aa][Bb][Ee][Ll][Ss] RETURN(syMsgLabels);
+<Normal>[Ss][Ee][Rr][Vv][Ee][Rr][Mm][Ss][Gg][Ll][Aa][Bb][Ee][Ll][Ss] RETURN(syServerMsgLabels);
+<Normal>[Uu][Ss][Ee][Rr][Mm][Ss][Gg][Ll][Aa][Bb][Ee][Ll][Ss] RETURN(syUserMsgLabels);
+
<Normal>[Ii][Nn][Oo][Uu][Tt] RETURN(syInOut);
<Normal>[Rr][Ee][Qq][Uu][Ee][Ss][Tt][Pp][Oo][Rr][Tt] RETURN(syRequestPort);
<Normal>[Rr][Ee][Pp][Ll][Yy][Pp][Oo][Rr][Tt] RETURN(syReplyPort);
==== //depot/projects/trustedbsd/sedarwin/apsl/bootstrap_cmds/migcom.tproj/parser.y#2 (text+ko) ====
@@ -100,9 +100,13 @@
%token syValueOf
%token syCString
+
%token sySecToken
%token syUserSecToken
%token syServerSecToken
+%token syMsgLabels
+%token syUserMsgLabels
+%token syServerMsgLabels
%token syColon
%token sySemi
@@ -681,6 +685,9 @@
| sySecToken { $$ = akSecToken; }
| syServerSecToken { $$ = akServerSecToken; }
| syUserSecToken { $$ = akUserSecToken; }
+ | syMsgLabels { $$ = akMsgLabels; }
+ | syServerMsgLabels { $$ = akServerMsgLabels; }
+ | syUserMsgLabels { $$ = akUserMsgLabels; }
| syMsgSeqno { $$ = akMsgSeqno; }
;
==== //depot/projects/trustedbsd/sedarwin/apsl/bootstrap_cmds/migcom.tproj/routine.c#2 (text+ko) ====
@@ -216,6 +216,9 @@
case akeSecToken:
printf("SecToken\t");
break;
+ case akeMsgLabels:
+ printf("MsgLabels\t");
+ break;
case akeImplicit:
printf("Implicit\t");
break;
@@ -928,6 +931,9 @@
case akeSecToken:
arg->argMsgField = "msgh_sender";
break;
+ case akeMsgLabels:
+ arg->argMsgField = "msgh_labels";
+ break;
case akeMsgSeqno:
arg->argMsgField = "msgh_seqno";
break;
@@ -1192,6 +1198,9 @@
if (akIdent(arg->argKind) == akeSecToken)
itCheckSecTokenType(arg->argVarName, arg->argType);
+ if (akIdent(arg->argKind) == akeMsgLabels)
+ itCheckMsgLabelsType(arg->argVarName, arg->argType);
+
if (akIdent(arg->argKind) == akeMsgSeqno)
itCheckIntType(arg->argVarName, arg->argType);
/*
@@ -1450,6 +1459,10 @@
if (akIdent(arg->argKind) == akeSecToken)
msgop->argVarName = strconcat(msgop->argVarName,
"|MACH_RCV_TRAILER_ELEMENTS(MACH_RCV_TRAILER_SENDER)");
+ else if (akIdent(arg->argKind) == akeMsgLabels)
+ msgop->argVarName = strconcat(msgop->argVarName,
+ "|MACH_RCV_TRAILER_ELEMENTS(MACH_RCV_TRAILER_LABELS)");
+
/* other implicit data received by the user will be handled here */
}
}
==== //depot/projects/trustedbsd/sedarwin/apsl/bootstrap_cmds/migcom.tproj/routine.h#2 (text+ko) ====
@@ -76,6 +76,7 @@
#define akeImplicit (16) /* an implicit argument, from the trailer */
#define akeSecToken (17) /* an argument from the trailer: the security token */
#define akeSendTime (18) /* pointed at by rtWaitTime */
+#define akeMsgLabels (19) /* an argument from the trailer: message labels */
#define akeBITS (0x0000003f)
#define akbRequest (0x00000040) /* has a msg_type in request */
@@ -233,6 +234,14 @@
akbServerArg|akbServerImplicit|akbSend|akbSendRcv| \
akbUserArg|akbUserImplicit|akbReturn|akbReturnRcv)
+#define akServerMsgLabels akAddFeature(akeMsgLabels, \
+ akbServerArg|akbServerImplicit|akbSend|akbSendRcv)
+#define akUserMsgLabels akAddFeature(akeMsgLabels, \
+ akbUserArg|akbUserImplicit|akbReturn|akbReturnRcv)
+#define akMsgLabels akAddFeature(akeMsgLabels, \
+ akbServerArg|akbServerImplicit|akbSend|akbSendRcv| \
+ akbUserArg|akbUserImplicit|akbReturn|akbReturnRcv)
+
#define akMsgSeqno akAddFeature(akeMsgSeqno, \
akbServerArg|akbServerImplicit|akbSend|akbSendRcv)
==== //depot/projects/trustedbsd/sedarwin/apsl/bootstrap_cmds/migcom.tproj/type.c#2 (text+ko) ====
@@ -946,3 +946,14 @@
it->itVarArray || it->itPortType)
error("argument %s isn't a proper SecToken", name);
}
+
+void
+itCheckMsgLabelsType(name, it)
+ identifier_t name;
+ ipc_type_t *it;
+{
+ if (it->itMigInLine || it->itNoOptArray || it->itString ||
+ it->itTypeSize != 64 || !it->itInLine || !it->itStruct ||
+ it->itVarArray || it->itPortType)
+ error("argument %s isn't a proper msg_labels_t", name);
+}
==== //depot/projects/trustedbsd/sedarwin/apsl/bootstrap_cmds/migcom.tproj/type.h#2 (text+ko) ====
@@ -260,5 +260,6 @@
extern void itCheckReplyPortType(/* identifier_t name, ipc_type_t *it */);
extern void itCheckIntType(/* identifier_t name, ipc_type_t *it */);
extern void itCheckSecTokenType(/* identifier_t name, ipc_type_t *it */);
+extern void itCheckMsgLabelsType(/* identifier_t name, ipc_type_t *it */);
#endif /* _TYPE_H */
To Unsubscribe: send mail to majordomo at trustedbsd.org
with "unsubscribe trustedbsd-cvs" in the body of the message
More information about the trustedbsd-cvs
mailing list